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 - " _ -
| Jeff Chua | 2.6.27rc1 cannot boot more than 8CPUs |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Winkler, Tomas | RE: iwlwifi: fix build bug in "iwlwifi: fix LED stall" |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Andrew Dickinson | tx queue hashing hot-spots and poor performance (multiq, ixgbe) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
