Commit c7cba062 authored by Linus Torvalds's avatar Linus Torvalds

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] cxgb3i: fix connection error when vlan is enabled
  [SCSI] FC transport: Locking fix for common-code FC pass-through patch
  [SCSI] zalon: fix oops on attach failure
  [SCSI] fnic: use DMA_BIT_MASK(nn) instead of deprecated DMA_nnBIT_MASK
  [SCSI] fnic: remove redundant BUG_ONs and fix checks on unsigned
  [SCSI] ibmvscsi: Fix module load hang
parents 405d7ca5 a222ad1a
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/inet.h> #include <linux/inet.h>
#include <linux/crypto.h> #include <linux/crypto.h>
#include <linux/if_vlan.h>
#include <net/dst.h> #include <net/dst.h>
#include <net/tcp.h> #include <net/tcp.h>
#include <scsi/scsi_cmnd.h> #include <scsi/scsi_cmnd.h>
...@@ -184,6 +185,9 @@ static struct cxgb3i_hba *cxgb3i_hba_find_by_netdev(struct net_device *ndev) ...@@ -184,6 +185,9 @@ static struct cxgb3i_hba *cxgb3i_hba_find_by_netdev(struct net_device *ndev)
struct cxgb3i_adapter *snic; struct cxgb3i_adapter *snic;
int i; int i;
if (ndev->priv_flags & IFF_802_1Q_VLAN)
ndev = vlan_dev_real_dev(ndev);
read_lock(&cxgb3i_snic_rwlock); read_lock(&cxgb3i_snic_rwlock);
list_for_each_entry(snic, &cxgb3i_snic_list, list_head) { list_for_each_entry(snic, &cxgb3i_snic_list, list_head) {
for (i = 0; i < snic->hba_cnt; i++) { for (i = 0; i < snic->hba_cnt; i++) {
......
...@@ -473,16 +473,16 @@ static int __devinit fnic_probe(struct pci_dev *pdev, ...@@ -473,16 +473,16 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
* limitation for the device. Try 40-bit first, and * limitation for the device. Try 40-bit first, and
* fail to 32-bit. * fail to 32-bit.
*/ */
err = pci_set_dma_mask(pdev, DMA_40BIT_MASK); err = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
if (err) { if (err) {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (err) { if (err) {
shost_printk(KERN_ERR, fnic->lport->host, shost_printk(KERN_ERR, fnic->lport->host,
"No usable DMA configuration " "No usable DMA configuration "
"aborting\n"); "aborting\n");
goto err_out_release_regions; goto err_out_release_regions;
} }
err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (err) { if (err) {
shost_printk(KERN_ERR, fnic->lport->host, shost_printk(KERN_ERR, fnic->lport->host,
"Unable to obtain 32-bit DMA " "Unable to obtain 32-bit DMA "
...@@ -490,7 +490,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev, ...@@ -490,7 +490,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
goto err_out_release_regions; goto err_out_release_regions;
} }
} else { } else {
err = pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK); err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(40));
if (err) { if (err) {
shost_printk(KERN_ERR, fnic->lport->host, shost_printk(KERN_ERR, fnic->lport->host,
"Unable to obtain 40-bit DMA " "Unable to obtain 40-bit DMA "
......
...@@ -245,7 +245,7 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic, ...@@ -245,7 +245,7 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
struct vnic_wq_copy *wq, struct vnic_wq_copy *wq,
struct fnic_io_req *io_req, struct fnic_io_req *io_req,
struct scsi_cmnd *sc, struct scsi_cmnd *sc,
u32 sg_count) int sg_count)
{ {
struct scatterlist *sg; struct scatterlist *sg;
struct fc_rport *rport = starget_to_rport(scsi_target(sc->device)); struct fc_rport *rport = starget_to_rport(scsi_target(sc->device));
...@@ -260,9 +260,6 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic, ...@@ -260,9 +260,6 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
char msg[2]; char msg[2];
if (sg_count) { if (sg_count) {
BUG_ON(sg_count < 0);
BUG_ON(sg_count > FNIC_MAX_SG_DESC_CNT);
/* For each SGE, create a device desc entry */ /* For each SGE, create a device desc entry */
desc = io_req->sgl_list; desc = io_req->sgl_list;
for_each_sg(scsi_sglist(sc), sg, sg_count, i) { for_each_sg(scsi_sglist(sc), sg, sg_count, i) {
...@@ -344,7 +341,7 @@ int fnic_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) ...@@ -344,7 +341,7 @@ int fnic_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
struct fnic *fnic; struct fnic *fnic;
struct vnic_wq_copy *wq; struct vnic_wq_copy *wq;
int ret; int ret;
u32 sg_count; int sg_count;
unsigned long flags; unsigned long flags;
unsigned long ptr; unsigned long ptr;
......
...@@ -1095,9 +1095,14 @@ static void adapter_info_rsp(struct srp_event_struct *evt_struct) ...@@ -1095,9 +1095,14 @@ static void adapter_info_rsp(struct srp_event_struct *evt_struct)
MAX_INDIRECT_BUFS); MAX_INDIRECT_BUFS);
hostdata->host->sg_tablesize = MAX_INDIRECT_BUFS; hostdata->host->sg_tablesize = MAX_INDIRECT_BUFS;
} }
if (hostdata->madapter_info.os_type == 3) {
enable_fast_fail(hostdata);
return;
}
} }
enable_fast_fail(hostdata); send_srp_login(hostdata);
} }
/** /**
......
...@@ -3670,13 +3670,14 @@ static void ...@@ -3670,13 +3670,14 @@ static void
fc_bsg_goose_queue(struct fc_rport *rport) fc_bsg_goose_queue(struct fc_rport *rport)
{ {
int flagset; int flagset;
unsigned long flags;
if (!rport->rqst_q) if (!rport->rqst_q)
return; return;
get_device(&rport->dev); get_device(&rport->dev);
spin_lock(rport->rqst_q->queue_lock); spin_lock_irqsave(rport->rqst_q->queue_lock, flags);
flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) && flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) &&
!test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags); !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags);
if (flagset) if (flagset)
...@@ -3684,7 +3685,7 @@ fc_bsg_goose_queue(struct fc_rport *rport) ...@@ -3684,7 +3685,7 @@ fc_bsg_goose_queue(struct fc_rport *rport)
__blk_run_queue(rport->rqst_q); __blk_run_queue(rport->rqst_q);
if (flagset) if (flagset)
queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q); queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q);
spin_unlock(rport->rqst_q->queue_lock); spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags);
put_device(&rport->dev); put_device(&rport->dev);
} }
......
...@@ -134,7 +134,7 @@ zalon_probe(struct parisc_device *dev) ...@@ -134,7 +134,7 @@ zalon_probe(struct parisc_device *dev)
host = ncr_attach(&zalon7xx_template, unit, &device); host = ncr_attach(&zalon7xx_template, unit, &device);
if (!host) if (!host)
goto fail; return -ENODEV;
if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) { if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
dev_printk(KERN_ERR, &dev->dev, "irq problem with %d, detaching\n ", dev_printk(KERN_ERR, &dev->dev, "irq problem with %d, detaching\n ",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment