Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (38 commits)
  fusion: mptsas, fix lock imbalance
  [SCSI] scsi_transport_fc: replace BUS_ID_SIZE by fixed count
  sd, sr: fix Driver 'sd' needs updating message
  scsi_transport_iscsi: return -EOVERFLOW for Too many iscsi targets
  fc_transport: Selective return value from BSG timeout function
  fc_transport: The softirq_done function registration for BSG request
  sym53c8xx: ratelimit parity errors
  explain the hidden scsi_wait_scan Kconfig variable
  ibmvfc: Fix endless PRLI loop in discovery
  ibmvfc: Process async events before command responses
  libfc: Add runtime debugging with debug_logging module parameter
  libfcoe: Add runtime debugging with module param debug_logging
  fcoe: Add runtime debug logging with module parameter debug_logging
  scsi_debug: Add support for physical block exponent and alignment
  cnic: add NETDEV_1000 and NETDEVICES to Kconfig select
  cnic: Fix __symbol_get() build error.
  Revert "[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’"
  ipr: differentiate pci-x and pci-e based adapters
  ipr: add test for MSI interrupt support
  scsi_transport_spi: Blacklist Ultrium-3 tape for IU transfers
  ...
  • Loading branch information
Linus Torvalds committed Jun 23, 2009
2 parents defe910 + 129dd98 commit f5bcf5f
Show file tree
Hide file tree
Showing 46 changed files with 1,245 additions and 604 deletions.
3 changes: 0 additions & 3 deletions block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
blk_put_request(rq);
if (next_rq) {
blk_rq_unmap_user(next_rq->bio);
next_rq->bio = NULL;
blk_put_request(next_rq);
}
return ERR_PTR(ret);
Expand Down Expand Up @@ -449,7 +448,6 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
hdr->dout_resid = rq->resid_len;
hdr->din_resid = rq->next_rq->resid_len;
blk_rq_unmap_user(bidi_bio);
rq->next_rq->bio = NULL;
blk_put_request(rq->next_rq);
} else if (rq_data_dir(rq) == READ)
hdr->din_resid = rq->resid_len;
Expand All @@ -468,7 +466,6 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
blk_rq_unmap_user(bio);
if (rq->cmd != rq->__cmd)
kfree(rq->cmd);
rq->bio = NULL;
blk_put_request(rq);

return ret;
Expand Down
4 changes: 2 additions & 2 deletions drivers/message/fusion/mptsas.c
Original file line number Diff line number Diff line change
Expand Up @@ -3518,7 +3518,7 @@ mptsas_not_responding_devices(MPT_ADAPTER *ioc)
} else
mptsas_volume_delete(ioc, sas_info->fw.id);
}
mutex_lock(&ioc->sas_device_info_mutex);
mutex_unlock(&ioc->sas_device_info_mutex);

/* expanders */
mutex_lock(&ioc->sas_topology_mutex);
Expand Down Expand Up @@ -3549,7 +3549,7 @@ mptsas_not_responding_devices(MPT_ADAPTER *ioc)
goto redo_expander_scan;
}
}
mutex_lock(&ioc->sas_topology_mutex);
mutex_unlock(&ioc->sas_topology_mutex);
}

/**
Expand Down
6 changes: 2 additions & 4 deletions drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/module.h>

#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define BCM_VLAN 1
#endif
Expand Down Expand Up @@ -2521,9 +2519,9 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev)
struct cnic_dev *cdev;
struct cnic_local *cp;
struct cnic_eth_dev *ethdev = NULL;
struct cnic_eth_dev *(*probe)(void *) = NULL;
struct cnic_eth_dev *(*probe)(struct net_device *) = NULL;

probe = __symbol_get("bnx2_cnic_probe");
probe = symbol_get(bnx2_cnic_probe);
if (probe) {
ethdev = (*probe)(dev);
symbol_put_addr(probe);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/cnic_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,6 @@ extern int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops);

extern int cnic_unregister_driver(int ulp_type);

extern struct cnic_eth_dev *bnx2_cnic_probe(struct net_device *dev);

#endif
13 changes: 12 additions & 1 deletion drivers/scsi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,21 @@ config SCSI_SCAN_ASYNC
or async on the kernel's command line.

config SCSI_WAIT_SCAN
tristate
tristate # No prompt here, this is an invisible symbol.
default m
depends on SCSI
depends on MODULES
# scsi_wait_scan is a loadable module which waits until all the async scans are
# complete. The idea is to use it in initrd/ initramfs scripts. You modprobe
# it after all the modprobes of the root SCSI drivers and it will wait until
# they have all finished scanning their buses before allowing the boot to
# proceed. (This method is not applicable if targets boot independently in
# parallel with the initiator, or with transports with non-deterministic target
# discovery schemes, or if a transport driver does not support scsi_wait_scan.)
#
# This symbol is not exposed as a prompt because little is to be gained by
# disabling it, whereas people who accidentally switch it off may wonder why
# their mkinitrd gets into trouble.

menu "SCSI Transports"
depends on SCSI
Expand Down
2 changes: 2 additions & 0 deletions drivers/scsi/bnx2i/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
config SCSI_BNX2_ISCSI
tristate "Broadcom NetXtreme II iSCSI support"
select SCSI_ISCSI_ATTRS
select NETDEVICES
select NETDEV_1000
select CNIC
depends on PCI
---help---
Expand Down
90 changes: 69 additions & 21 deletions drivers/scsi/cxgb3i/cxgb3i_ddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,31 @@ int cxgb3i_ddp_find_page_index(unsigned long pgsz)
return DDP_PGIDX_MAX;
}

/**
* cxgb3i_ddp_adjust_page_table - adjust page table with PAGE_SIZE
* return the ddp page index, if no match is found return DDP_PGIDX_MAX.
*/
int cxgb3i_ddp_adjust_page_table(void)
{
int i;
unsigned int base_order, order;

if (PAGE_SIZE < (1UL << ddp_page_shift[0])) {
ddp_log_info("PAGE_SIZE 0x%lx too small, min. 0x%lx.\n",
PAGE_SIZE, 1UL << ddp_page_shift[0]);
return -EINVAL;
}

base_order = get_order(1UL << ddp_page_shift[0]);
order = get_order(1 << PAGE_SHIFT);
for (i = 0; i < DDP_PGIDX_MAX; i++) {
/* first is the kernel page size, then just doubling the size */
ddp_page_order[i] = order - base_order + i;
ddp_page_shift[i] = PAGE_SHIFT + i;
}
return 0;
}

static inline void ddp_gl_unmap(struct pci_dev *pdev,
struct cxgb3i_gather_list *gl)
{
Expand Down Expand Up @@ -598,30 +623,40 @@ int cxgb3i_adapter_ddp_info(struct t3cdev *tdev,
* release all the resource held by the ddp pagepod manager for a given
* adapter if needed
*/
void cxgb3i_ddp_cleanup(struct t3cdev *tdev)

static void ddp_cleanup(struct kref *kref)
{
struct cxgb3i_ddp_info *ddp = container_of(kref,
struct cxgb3i_ddp_info,
refcnt);
int i = 0;

ddp_log_info("kref release ddp 0x%p, t3dev 0x%p.\n", ddp, ddp->tdev);

ddp->tdev->ulp_iscsi = NULL;
while (i < ddp->nppods) {
struct cxgb3i_gather_list *gl = ddp->gl_map[i];
if (gl) {
int npods = (gl->nelem + PPOD_PAGES_MAX - 1)
>> PPOD_PAGES_SHIFT;
ddp_log_info("t3dev 0x%p, ddp %d + %d.\n",
ddp->tdev, i, npods);
kfree(gl);
ddp_free_gl_skb(ddp, i, npods);
i += npods;
} else
i++;
}
cxgb3i_free_big_mem(ddp);
}

void cxgb3i_ddp_cleanup(struct t3cdev *tdev)
{
struct cxgb3i_ddp_info *ddp = (struct cxgb3i_ddp_info *)tdev->ulp_iscsi;

ddp_log_info("t3dev 0x%p, release ddp 0x%p.\n", tdev, ddp);

if (ddp) {
tdev->ulp_iscsi = NULL;
while (i < ddp->nppods) {
struct cxgb3i_gather_list *gl = ddp->gl_map[i];
if (gl) {
int npods = (gl->nelem + PPOD_PAGES_MAX - 1)
>> PPOD_PAGES_SHIFT;
ddp_log_info("t3dev 0x%p, ddp %d + %d.\n",
tdev, i, npods);
kfree(gl);
ddp_free_gl_skb(ddp, i, npods);
i += npods;
} else
i++;
}
cxgb3i_free_big_mem(ddp);
}
if (ddp)
kref_put(&ddp->refcnt, ddp_cleanup);
}

/**
Expand All @@ -631,12 +666,13 @@ void cxgb3i_ddp_cleanup(struct t3cdev *tdev)
*/
static void ddp_init(struct t3cdev *tdev)
{
struct cxgb3i_ddp_info *ddp;
struct cxgb3i_ddp_info *ddp = tdev->ulp_iscsi;
struct ulp_iscsi_info uinfo;
unsigned int ppmax, bits;
int i, err;

if (tdev->ulp_iscsi) {
if (ddp) {
kref_get(&ddp->refcnt);
ddp_log_warn("t3dev 0x%p, ddp 0x%p already set up.\n",
tdev, tdev->ulp_iscsi);
return;
Expand Down Expand Up @@ -670,6 +706,7 @@ static void ddp_init(struct t3cdev *tdev)
ppmax *
sizeof(struct cxgb3i_gather_list *));
spin_lock_init(&ddp->map_lock);
kref_init(&ddp->refcnt);

ddp->tdev = tdev;
ddp->pdev = uinfo.pdev;
Expand Down Expand Up @@ -715,6 +752,17 @@ void cxgb3i_ddp_init(struct t3cdev *tdev)
{
if (page_idx == DDP_PGIDX_MAX) {
page_idx = cxgb3i_ddp_find_page_index(PAGE_SIZE);

if (page_idx == DDP_PGIDX_MAX) {
ddp_log_info("system PAGE_SIZE %lu, update hw.\n",
PAGE_SIZE);
if (cxgb3i_ddp_adjust_page_table() < 0) {
ddp_log_info("PAGE_SIZE %lu, ddp disabled.\n",
PAGE_SIZE);
return;
}
page_idx = cxgb3i_ddp_find_page_index(PAGE_SIZE);
}
ddp_log_info("system PAGE_SIZE %lu, ddp idx %u.\n",
PAGE_SIZE, page_idx);
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/scsi/cxgb3i/cxgb3i_ddp.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ struct cxgb3i_gather_list {
* struct cxgb3i_ddp_info - cxgb3i direct data placement for pdu payload
*
* @list: list head to link elements
* @refcnt: ref. count
* @tdev: pointer to t3cdev used by cxgb3 driver
* @max_txsz: max tx packet size for ddp
* @max_rxsz: max rx packet size for ddp
Expand All @@ -70,6 +71,7 @@ struct cxgb3i_gather_list {
*/
struct cxgb3i_ddp_info {
struct list_head list;
struct kref refcnt;
struct t3cdev *tdev;
struct pci_dev *pdev;
unsigned int max_txsz;
Expand Down
Loading

0 comments on commit f5bcf5f

Please sign in to comment.