Re: 2.6.23-rc4-mm1

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andy Whitcroft <apw@...>
Cc: <linux-kernel@...>, <mel@...>, Jens Axboe <jens.axboe@...>, <linux-scsi@...>
Date: Monday, September 10, 2007 - 2:19 pm

On Mon, 10 Sep 2007 18:49:26 +0100 Andy Whitcroft <apw@shadowen.org> wrote:


cc's added.


The only patch which touches qla1280 is git-block.patch.  From a quick
squizz the change looks OK, although it's tricky and something might have
broken.

(the dprintk at line 2929 needs to print remseg, not seg_cnt).

Can you retest with that change reverted (below)?  If it's not that then
perhaps something in scsi core broke, dunno.


diff -puN drivers/scsi/qla1280.c~revert-1 drivers/scsi/qla1280.c
--- a/drivers/scsi/qla1280.c~revert-1
+++ a/drivers/scsi/qla1280.c
@@ -2775,7 +2775,7 @@ qla1280_64bit_start_scsi(struct scsi_qla
 	struct device_reg __iomem *reg = ha->iobase;
 	struct scsi_cmnd *cmd = sp->cmd;
 	cmd_a64_entry_t *pkt;
-	struct scatterlist *sg = NULL, *s;
+	struct scatterlist *sg = NULL;
 	__le32 *dword_ptr;
 	dma_addr_t dma_handle;
 	int status = 0;
@@ -2889,16 +2889,13 @@ qla1280_64bit_start_scsi(struct scsi_qla
 	 * Load data segments.
 	 */
 	if (seg_cnt) {	/* If data transfer. */
-		int remseg = seg_cnt;
 		/* Setup packet address segment pointer. */
 		dword_ptr = (u32 *)&pkt->dseg_0_address;
 
 		if (cmd->use_sg) {	/* If scatter gather */
 			/* Load command entry data segments. */
-			for_each_sg(sg, s, seg_cnt, cnt) {
-				if (cnt == 2)
-					break;
-				dma_handle = sg_dma_address(s);
+			for (cnt = 0; cnt < 2 && seg_cnt; cnt++, seg_cnt--) {
+				dma_handle = sg_dma_address(sg);
 #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
 				if (ha->flags.use_pci_vchannel)
 					sn_pci_set_vchan(ha->pdev,
@@ -2909,12 +2906,12 @@ qla1280_64bit_start_scsi(struct scsi_qla
 					cpu_to_le32(pci_dma_lo32(dma_handle));
 				*dword_ptr++ =
 					cpu_to_le32(pci_dma_hi32(dma_handle));
-				*dword_ptr++ = cpu_to_le32(sg_dma_len(s));
+				*dword_ptr++ = cpu_to_le32(sg_dma_len(sg));
+				sg++;
 				dprintk(3, "S/G Segment phys_addr=%x %x, len=0x%x\n",
 					cpu_to_le32(pci_dma_hi32(dma_handle)),
 					cpu_to_le32(pci_dma_lo32(dma_handle)),
-					cpu_to_le32(sg_dma_len(sg_next(s))));
-				remseg--;
+					cpu_to_le32(sg_dma_len(sg)));
 			}
 			dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather "
 				"command packet data - b %i, t %i, l %i \n",
@@ -2929,9 +2926,7 @@ qla1280_64bit_start_scsi(struct scsi_qla
 			dprintk(3, "S/G Building Continuation...seg_cnt=0x%x "
 				"remains\n", seg_cnt);
 
-			while (remseg > 0) {
-				/* Update sg start */
-				sg = s;
+			while (seg_cnt > 0) {
 				/* Adjust ring index. */
 				ha->req_ring_index++;
 				if (ha->req_ring_index == REQUEST_ENTRY_CNT) {
@@ -2957,10 +2952,9 @@ qla1280_64bit_start_scsi(struct scsi_qla
 					(u32 *)&((struct cont_a64_entry *) pkt)->dseg_0_address;
 
 				/* Load continuation entry data segments. */
-				for_each_sg(sg, s, remseg, cnt) {
-					if (cnt == 5)
-						break;
-					dma_handle = sg_dma_address(s);
+				for (cnt = 0; cnt < 5 && seg_cnt;
+				     cnt++, seg_cnt--) {
+					dma_handle = sg_dma_address(sg);
 #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
 				if (ha->flags.use_pci_vchannel)
 					sn_pci_set_vchan(ha->pdev, 
@@ -2972,12 +2966,12 @@ qla1280_64bit_start_scsi(struct scsi_qla
 					*dword_ptr++ =
 						cpu_to_le32(pci_dma_hi32(dma_handle));
 					*dword_ptr++ =
-						cpu_to_le32(sg_dma_len(s));
+						cpu_to_le32(sg_dma_len(sg));
 					dprintk(3, "S/G Segment Cont. phys_addr=%x %x, len=0x%x\n",
 						cpu_to_le32(pci_dma_hi32(dma_handle)),
 						cpu_to_le32(pci_dma_lo32(dma_handle)),
-						cpu_to_le32(sg_dma_len(s)));
-					remseg--;
+						cpu_to_le32(sg_dma_len(sg)));
+					sg++;
 				}
 				dprintk(5, "qla1280_64bit_start_scsi: "
 					"continuation packet data - b %i, t "
@@ -3068,7 +3062,7 @@ qla1280_32bit_start_scsi(struct scsi_qla
 	struct device_reg __iomem *reg = ha->iobase;
 	struct scsi_cmnd *cmd = sp->cmd;
 	struct cmd_entry *pkt;
-	struct scatterlist *sg = NULL, *s;
+	struct scatterlist *sg = NULL;
 	__le32 *dword_ptr;
 	int status = 0;
 	int cnt;
@@ -3194,7 +3188,6 @@ qla1280_32bit_start_scsi(struct scsi_qla
 	 * Load data segments.
 	 */
 	if (seg_cnt) {
-		int remseg = seg_cnt;
 		/* Setup packet address segment pointer. */
 		dword_ptr = &pkt->dseg_0_address;
 
@@ -3203,25 +3196,22 @@ qla1280_32bit_start_scsi(struct scsi_qla
 			qla1280_dump_buffer(1, (char *)sg, 4 * 16);
 
 			/* Load command entry data segments. */
-			for_each_sg(sg, s, seg_cnt, cnt) {
-				if (cnt == 4)
-					break;
+			for (cnt = 0; cnt < 4 && seg_cnt; cnt++, seg_cnt--) {
 				*dword_ptr++ =
-					cpu_to_le32(pci_dma_lo32(sg_dma_address(s)));
-				*dword_ptr++ = cpu_to_le32(sg_dma_len(s));
+					cpu_to_le32(pci_dma_lo32(sg_dma_address(sg)));
+				*dword_ptr++ =
+					cpu_to_le32(sg_dma_len(sg));
 				dprintk(3, "S/G Segment phys_addr=0x%lx, len=0x%x\n",
-					(pci_dma_lo32(sg_dma_address(s))),
-					(sg_dma_len(s)));
-				remseg--;
+					(pci_dma_lo32(sg_dma_address(sg))),
+					(sg_dma_len(sg)));
+				sg++;
 			}
 			/*
 			 * Build continuation packets.
 			 */
 			dprintk(3, "S/G Building Continuation"
 				"...seg_cnt=0x%x remains\n", seg_cnt);
-			while (remseg > 0) {
-				/* Continue from end point */
-				sg = s;
+			while (seg_cnt > 0) {
 				/* Adjust ring index. */
 				ha->req_ring_index++;
 				if (ha->req_ring_index == REQUEST_ENTRY_CNT) {
@@ -3249,16 +3239,18 @@ qla1280_32bit_start_scsi(struct scsi_qla
 					&((struct cont_entry *) pkt)->dseg_0_address;
 
 				/* Load continuation entry data segments. */
-				for_each_sg(sg, s, remseg, cnt) {
+				for (cnt = 0; cnt < 7 && seg_cnt;
+				     cnt++, seg_cnt--) {
 					*dword_ptr++ =
-						cpu_to_le32(pci_dma_lo32(sg_dma_address(s)));
+						cpu_to_le32(pci_dma_lo32(sg_dma_address(sg)));
 					*dword_ptr++ =
-						cpu_to_le32(sg_dma_len(s));
+						cpu_to_le32(sg_dma_len(sg));
 					dprintk(1,
 						"S/G Segment Cont. phys_addr=0x%x, "
 						"len=0x%x\n",
-						cpu_to_le32(pci_dma_lo32(sg_dma_address(s))),
-						cpu_to_le32(sg_dma_len(s)));
+						cpu_to_le32(pci_dma_lo32(sg_dma_address(sg))),
+						cpu_to_le32(sg_dma_len(sg)));
+					sg++;
 				}
 				dprintk(5, "qla1280_32bit_start_scsi: "
 					"continuation packet data - "
_

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.23-rc4-mm1, Andrew Morton, (Sat Sep 1, 12:58 am)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Laurent Riffard, (Mon Sep 10, 4:19 pm)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Laurent Riffard, (Thu Sep 13, 6:50 pm)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Jens Axboe, (Fri Sep 14, 5:33 am)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Jens Axboe, (Fri Sep 14, 7:06 am)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Laurent Riffard, (Fri Sep 14, 3:04 pm)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Andrew Morton, (Thu Sep 13, 7:05 pm)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Jens Axboe, (Fri Sep 14, 4:00 am)
Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd, Jens Axboe, (Fri Sep 14, 4:30 am)
Re: 2.6.23-rc4-mm1, Andy Whitcroft, (Mon Sep 10, 1:49 pm)
Re: 2.6.23-rc4-mm1, Andrew Morton, (Mon Sep 10, 2:19 pm)
Re: 2.6.23-rc4-mm1, FUJITA Tomonori, (Mon Sep 10, 3:31 pm)
Re: 2.6.23-rc4-mm1, Andy Whitcroft, (Fri Sep 14, 4:10 am)
Re: 2.6.23-rc4-mm1, Torsten Kaiser, (Fri Sep 14, 9:01 am)
Re: 2.6.23-rc4-mm1, Andrew Morton, (Fri Sep 14, 4:15 pm)
Re: 2.6.23-rc4-mm1, FUJITA Tomonori, (Mon Sep 10, 3:10 pm)
Re: 2.6.23-rc4-mm1, Paul Jackson, (Sat Sep 15, 12:16 am)
Re: 2.6.23-rc4-mm1, FUJITA Tomonori, (Sat Sep 15, 6:52 am)
Re: 2.6.23-rc4-mm1, Jens Axboe, (Mon Sep 17, 9:28 am)
Re: 2.6.23-rc4-mm1, FUJITA Tomonori, (Mon Sep 17, 10:32 am)
Re: 2.6.23-rc4-mm1, Jens Axboe, (Tue Sep 18, 6:18 am)
Re: 2.6.23-rc4-mm1, FUJITA Tomonori, (Tue Sep 18, 8:25 am)
Re: 2.6.23-rc4-mm1, Jens Axboe, (Tue Sep 18, 8:51 am)
Re: 2.6.23-rc4-mm1, Andy Whitcroft, (Thu Sep 13, 1:34 pm)
Re: 2.6.23-rc4-mm1, Torsten Kaiser, (Mon Sep 10, 2:59 pm)
Re: 2.6.23-rc4-mm1, Andrew Morton, (Mon Sep 10, 3:20 pm)
Re: 2.6.23-rc4-mm1, FUJITA Tomonori, (Mon Sep 10, 3:42 pm)
Re: 2.6.23-rc4-mm1, Torsten Kaiser, (Mon Sep 10, 4:43 pm)
Re: 2.6.23-rc4-mm1, Jens Axboe, (Tue Sep 11, 4:32 am)
Re: 2.6.23-rc4-mm1, Torsten Kaiser, (Mon Sep 10, 3:38 pm)
[-mm patch] make do_try_to_free_pages() static, Adrian Bunk, (Sun Sep 9, 4:26 pm)
Re: [-mm patch] make do_try_to_free_pages() static, Balbir Singh, (Mon Sep 10, 4:24 am)
[-mm patch] make tcp_splice_data_recv() static, Adrian Bunk, (Sun Sep 9, 4:25 pm)
Re: [-mm patch] make tcp_splice_data_recv() static, David Miller, (Wed Sep 12, 9:21 am)
Re: [-mm patch] make tcp_splice_data_recv() static, Jens Axboe, (Wed Sep 12, 1:44 pm)
[-mm patch] mm/memcontrol.c: clenups, Adrian Bunk, (Sun Sep 9, 4:25 pm)
Re: [-mm patch] mm/memcontrol.c: clenups, Balbir Singh, (Mon Sep 10, 4:23 am)
Re: [-mm patch] mm/memcontrol.c: clenups, Adrian Bunk, (Mon Sep 10, 5:59 pm)
Re: [-mm patch] mm/memcontrol.c: clenups, Balbir Singh, (Mon Sep 10, 10:41 pm)
Re: [-mm patch] mm/memcontrol.c: clenups, Jan Engelhardt, (Mon Sep 10, 3:58 pm)
Re: [-mm patch] mm/memcontrol.c: clenups, Jan Engelhardt, (Mon Sep 10, 3:59 pm)
[-mm patch] unexport raise_softirq_irqoff, Adrian Bunk, (Sun Sep 9, 4:25 pm)
Re: [-mm patch] unexport raise_softirq_irqoff, Christoph Hellwig, (Sun Sep 9, 4:41 pm)
Re: [-mm patch] unexport raise_softirq_irqoff, David Miller, (Wed Sep 12, 9:15 am)
[-mm patch] really unexport do_softirq, Adrian Bunk, (Sun Sep 9, 4:25 pm)
Re: [-mm patch] really unexport do_softirq, David Miller, (Wed Sep 12, 9:14 am)
[-mm patch] kernel/kexec.c: make code static, Adrian Bunk, (Sun Sep 9, 4:25 pm)
Re: [-mm patch] kernel/kexec.c: make code static, Ken'ichi Ohmichi, (Sun Sep 9, 10:55 pm)
Re: [-mm patch] kernel/kexec.c: make code static, Adrian Bunk, (Mon Sep 10, 8:20 am)
Re: [-mm patch] kernel/kexec.c: make code static, Maneesh Soni, (Tue Sep 11, 1:53 am)
Re: [-mm patch] kernel/kexec.c: make code static, Ken'ichi Ohmichi, (Wed Sep 12, 3:37 am)
[-mm patch] make nfs_wb_page_priority() static, Adrian Bunk, (Sun Sep 9, 4:25 pm)
[-mm patch] remove ide_get_error_location(), Adrian Bunk, (Sun Sep 9, 4:24 pm)
Re: [-mm patch] remove ide_get_error_location(), Bartlomiej Zolnierkiewicz..., (Tue Sep 11, 5:27 pm)
Re: [-mm patch] remove ide_get_error_location(), Jens Axboe, (Wed Sep 12, 1:54 am)
Re: 2.6.23-rc4-mm1, Mel Gorman, (Sun Sep 9, 8:22 am)
ath5k driver not working on ThinkPad, Robert de Rooy, (Fri Sep 14, 11:12 am)
Re: 2.6.23-rc4-mm1 myri10ge module link error on x86_64, Mathieu Desnoyers, (Thu Sep 6, 3:37 pm)
Re: 2.6.23-rc4-mm1 myri10ge module link error on x86_64, Avuton Olrich, (Sat Oct 13, 6:03 pm)
Re: 2.6.23-rc4-mm1 myri10ge module link error on x86_64, Daniel Walker, (Fri Sep 7, 8:25 pm)
Re: 2.6.23-rc4-mm1, , (Wed Sep 5, 10:37 am)
Re: 2.6.23-rc4-mm1, Andrew Morton, (Wed Sep 5, 11:12 am)
Re: 2.6.23-rc4-mm1, , (Wed Sep 5, 11:58 am)
Re: 2.6.23-rc4-mm1, Balbir Singh, (Wed Sep 5, 11:20 am)
Re: 2.6.23-rc4-mm1, Zach Carter, (Tue Sep 4, 1:54 pm)
Re: 2.6.23-rc4-mm1, Stephen Hemminger, (Tue Sep 4, 5:36 pm)
Re: 2.6.23-rc4-mm1, Randy Dunlap, (Mon Sep 3, 12:30 am)
Re: 2.6.23-rc4-mm1, Wim Van Sebroeck, (Mon Sep 3, 3:25 pm)
Re: 2.6.23-rc4-mm1, Satyam Sharma, (Mon Sep 3, 6:32 pm)
Re: 2.6.23-rc4-mm1, Wim Van Sebroeck, (Tue Sep 4, 5:21 pm)
Re: 2.6.23-rc4-mm1: boot failure on HPC nx6325, Rafael J. Wysocki, (Sun Sep 2, 4:39 pm)
Re: 2.6.23-rc4-mm1: boot failure on HPC nx6325, Thomas Gleixner, (Mon Sep 3, 4:36 am)
Re: 2.6.23-rc4-mm1: boot failure on HPC nx6325, Rafael J. Wysocki, (Mon Sep 3, 4:51 pm)
Re: 2.6.23-rc4-mm1: boot failure on HPC nx6325, Thomas Gleixner, (Mon Sep 3, 9:03 pm)
Re: 2.6.23-rc4-mm1: boot failure on HPC nx6325, Rafael J. Wysocki, (Mon Sep 3, 6:15 am)
Re: 2.6.23-rc4-mm1: broke pata_via cable detection, Laurent Riffard, (Sun Sep 2, 3:01 pm)
Re: 2.6.23-rc4-mm1: broke pata_via cable detection, Jeff Garzik, (Mon Sep 10, 9:50 pm)
[PATCH -mm] softlockup-improve-debug-output.patch fix, Satyam Sharma, (Sat Sep 1, 7:12 pm)
Re: 2.6.23-rc4-mm1 "no CRC" MODPOST warnings, Satyam Sharma, (Sat Sep 1, 6:06 pm)
Re: 2.6.23-rc4-mm1 "no CRC" MODPOST warnings, Sam Ravnborg, (Sat Sep 1, 7:15 pm)
Re: 2.6.23-rc4-mm1 "no CRC" MODPOST warnings, Adrian Bunk, (Sat Sep 1, 6:40 pm)
Re: 2.6.23-rc4-mm1, Torsten Kaiser, (Sat Sep 1, 12:07 pm)
Re: 2.6.23-rc4-mm1, Andrew Morton, (Sat Sep 1, 12:16 pm)
[-mm patch] IPV6 must select XFRM, Adrian Bunk, (Sun Sep 2, 7:25 am)
Re: [-mm patch] IPV6 must select XFRM, Masahide NAKAMURA, (Mon Sep 3, 6:43 am)
Re: net-26.24 broken with XFRM off, Noriaki TAKAMIYA, (Thu Sep 6, 6:01 am)
2.6.23-rc4-mm1 net bitops compile error, Adrian Bunk, (Sun Sep 2, 5:14 am)
Re: 2.6.23-rc4-mm1 net bitops compile error, Jiri Slaby, (Tue Sep 4, 1:53 pm)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Jeff Garzik, (Sat Sep 1, 3:05 pm)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Satyam Sharma, (Sat Sep 1, 8:54 pm)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Satyam Sharma, (Sun Sep 2, 5:55 am)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Andrew James Wade, (Thu Sep 13, 11:51 pm)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Dhaval Giani, (Mon Sep 17, 9:57 am)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Denis V. Lunev, (Mon Sep 17, 10:07 am)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Satyam Sharma, (Mon Sep 17, 7:56 pm)
Re: 2.6.23-rc4-mm1 OOPS in forcedeth?, Vlad Yasevich, (Mon Sep 17, 5:00 pm)
Re: 2.6.23-rc4-mm1, KAMEZAWA Hiroyuki, (Sat Sep 1, 2:53 am)
Re: 2.6.23-rc4-mm1, Andrew Morton, (Sat Sep 1, 2:58 am)
Re: 2.6.23-rc4-mm1, Kamalesh Babulal, (Sat Sep 1, 7:55 am)
Re: 2.6.23-rc4-mm1, Herbert Xu, (Sat Sep 1, 4:54 am)
Re: 2.6.23-rc4-mm1, Satyam Sharma, (Sat Sep 1, 5:09 pm)
Re: 2.6.23-rc4-mm1, Herbert Xu, (Sat Sep 1, 9:46 pm)
Re: 2.6.23-rc4-mm1, Satyam Sharma, (Sat Sep 1, 10:52 pm)
Re: 2.6.23-rc4-mm1, Herbert Xu, (Sat Sep 1, 11:59 pm)
2.6.23-rc4-mm1: mips compile error, Adrian Bunk, (Sat Sep 1, 11:44 am)
Re: 2.6.23-rc4-mm1: mips compile error, Mathieu Desnoyers, (Tue Sep 4, 1:27 am)
Re: 2.6.23-rc4-mm1: mips compile error, Ralf Baechle, (Tue Sep 4, 6:21 am)
2.6.23-rc4-mm1: two ktime_sub_ns() functions, Adrian Bunk, (Sat Sep 1, 11:19 am)
2.6.23-rc4-mm1: geode fb compile error, Adrian Bunk, (Sat Sep 1, 10:18 am)
Re: 2.6.23-rc4-mm1: geode fb compile error, Satyam Sharma, (Sat Sep 1, 1:03 pm)