Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] qla2xxx: Obtain proper host structure during response-queue processing.
[SCSI] compat_ioct: fix bsg SG_IO
[SCSI] qla2xxx: make msix interrupt handler safe for irq
[SCSI] zfcp: Report FC BSG errors in correct field
[SCSI] mptfusion : mptscsih_abort return value should be SUCCESS instead of value 0.

+26 -44
+1 -1
drivers/message/fusion/mptscsih.c
··· 1796 1796 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "task abort: " 1797 1797 "Command not in the active list! (sc=%p)\n", ioc->name, 1798 1798 SCpnt)); 1799 - retval = 0; 1799 + retval = SUCCESS; 1800 1800 goto out; 1801 1801 } 1802 1802
+4 -5
drivers/s390/scsi/zfcp_fc.c
··· 671 671 { 672 672 struct fc_bsg_job *job = data; 673 673 struct zfcp_fsf_ct_els *zfcp_ct_els = job->dd_data; 674 - int status = zfcp_ct_els->status; 675 - int reply_status; 674 + struct fc_bsg_reply *jr = job->reply; 676 675 677 - reply_status = status ? FC_CTELS_STATUS_REJECT : FC_CTELS_STATUS_OK; 678 - job->reply->reply_data.ctels_reply.status = reply_status; 679 - job->reply->reply_payload_rcv_len = job->reply_payload.payload_len; 676 + jr->reply_payload_rcv_len = job->reply_payload.payload_len; 677 + jr->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; 678 + jr->result = zfcp_ct_els->status ? -EIO : 0; 680 679 job->job_done(job); 681 680 } 682 681
-1
drivers/scsi/qla2xxx/qla_gbl.h
··· 453 453 extern void qla25xx_wrt_req_reg(struct qla_hw_data *, uint16_t, uint16_t); 454 454 extern void qla25xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t); 455 455 extern void qla24xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t); 456 - extern struct scsi_qla_host * qla25xx_get_host(struct rsp_que *); 457 456 458 457 #endif /* _QLA_GBL_H */
+10 -34
drivers/scsi/qla2xxx/qla_isr.c
··· 1917 1917 struct rsp_que *rsp; 1918 1918 struct device_reg_24xx __iomem *reg; 1919 1919 struct scsi_qla_host *vha; 1920 + unsigned long flags; 1920 1921 1921 1922 rsp = (struct rsp_que *) dev_id; 1922 1923 if (!rsp) { ··· 1928 1927 ha = rsp->hw; 1929 1928 reg = &ha->iobase->isp24; 1930 1929 1931 - spin_lock_irq(&ha->hardware_lock); 1930 + spin_lock_irqsave(&ha->hardware_lock, flags); 1932 1931 1933 - vha = qla25xx_get_host(rsp); 1932 + vha = pci_get_drvdata(ha->pdev); 1934 1933 qla24xx_process_response_queue(vha, rsp); 1935 1934 if (!ha->flags.disable_msix_handshake) { 1936 1935 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT); 1937 1936 RD_REG_DWORD_RELAXED(&reg->hccr); 1938 1937 } 1939 - spin_unlock_irq(&ha->hardware_lock); 1938 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1940 1939 1941 1940 return IRQ_HANDLED; 1942 1941 } ··· 1947 1946 struct qla_hw_data *ha; 1948 1947 struct rsp_que *rsp; 1949 1948 struct device_reg_24xx __iomem *reg; 1949 + unsigned long flags; 1950 1950 1951 1951 rsp = (struct rsp_que *) dev_id; 1952 1952 if (!rsp) { ··· 1960 1958 /* Clear the interrupt, if enabled, for this response queue */ 1961 1959 if (rsp->options & ~BIT_6) { 1962 1960 reg = &ha->iobase->isp24; 1963 - spin_lock_irq(&ha->hardware_lock); 1961 + spin_lock_irqsave(&ha->hardware_lock, flags); 1964 1962 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT); 1965 1963 RD_REG_DWORD_RELAXED(&reg->hccr); 1966 - spin_unlock_irq(&ha->hardware_lock); 1964 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1967 1965 } 1968 1966 queue_work_on((int) (rsp->id - 1), ha->wq, &rsp->q_work); 1969 1967 ··· 1981 1979 uint32_t stat; 1982 1980 uint32_t hccr; 1983 1981 uint16_t mb[4]; 1982 + unsigned long flags; 1984 1983 1985 1984 rsp = (struct rsp_que *) dev_id; 1986 1985 if (!rsp) { ··· 1993 1990 reg = &ha->iobase->isp24; 1994 1991 status = 0; 1995 1992 1996 - spin_lock_irq(&ha->hardware_lock); 1993 + spin_lock_irqsave(&ha->hardware_lock, flags); 1997 1994 vha = pci_get_drvdata(ha->pdev); 1998 1995 do { 1999 1996 stat = RD_REG_DWORD(&reg->host_status); ··· 2042 2039 } 2043 2040 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT); 2044 2041 } while (0); 2045 - spin_unlock_irq(&ha->hardware_lock); 2042 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 2046 2043 2047 2044 if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && 2048 2045 (status & MBX_INTERRUPT) && ha->flags.mbox_int) { ··· 2279 2276 msix->have_irq = 1; 2280 2277 msix->rsp = rsp; 2281 2278 return ret; 2282 - } 2283 - 2284 - struct scsi_qla_host * 2285 - qla25xx_get_host(struct rsp_que *rsp) 2286 - { 2287 - srb_t *sp; 2288 - struct qla_hw_data *ha = rsp->hw; 2289 - struct scsi_qla_host *vha = NULL; 2290 - struct sts_entry_24xx *pkt; 2291 - struct req_que *req; 2292 - uint16_t que; 2293 - uint32_t handle; 2294 - 2295 - pkt = (struct sts_entry_24xx *) rsp->ring_ptr; 2296 - que = MSW(pkt->handle); 2297 - handle = (uint32_t) LSW(pkt->handle); 2298 - req = ha->req_q_map[que]; 2299 - if (handle < MAX_OUTSTANDING_COMMANDS) { 2300 - sp = req->outstanding_cmds[handle]; 2301 - if (sp) 2302 - return sp->fcport->vha; 2303 - else 2304 - goto base_que; 2305 - } 2306 - base_que: 2307 - vha = pci_get_drvdata(ha->pdev); 2308 - return vha; 2309 2279 }
+5 -3
drivers/scsi/qla2xxx/qla_mid.c
··· 636 636 637 637 static void qla_do_work(struct work_struct *work) 638 638 { 639 + unsigned long flags; 639 640 struct rsp_que *rsp = container_of(work, struct rsp_que, q_work); 640 641 struct scsi_qla_host *vha; 642 + struct qla_hw_data *ha = rsp->hw; 641 643 642 - spin_lock_irq(&rsp->hw->hardware_lock); 643 - vha = qla25xx_get_host(rsp); 644 + spin_lock_irqsave(&rsp->hw->hardware_lock, flags); 645 + vha = pci_get_drvdata(ha->pdev); 644 646 qla24xx_process_response_queue(vha, rsp); 645 - spin_unlock_irq(&rsp->hw->hardware_lock); 647 + spin_unlock_irqrestore(&rsp->hw->hardware_lock, flags); 646 648 } 647 649 648 650 /* create response queue */
+6
fs/compat_ioctl.c
··· 301 301 u32 data; 302 302 void __user *dxferp; 303 303 int err; 304 + int interface_id; 305 + 306 + if (get_user(interface_id, &sgio32->interface_id)) 307 + return -EFAULT; 308 + if (interface_id != 'S') 309 + return sys_ioctl(fd, cmd, (unsigned long)sgio32); 304 310 305 311 if (get_user(iovec_count, &sgio32->iovec_count)) 306 312 return -EFAULT;