You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (59 commits) [SCSI] replace __FUNCTION__ with __func__ [SCSI] extend the last_sector_bug flag to cover more sectors [SCSI] qla2xxx: Update version number to 8.02.01-k6. [SCSI] qla2xxx: Additional NPIV corrections. [SCSI] qla2xxx: suppress uninitialized-var warning [SCSI] qla2xxx: use memory_read_from_buffer() [SCSI] qla2xxx: Issue proper ISP callbacks during stop-firmware. [SCSI] ch: fix ch_remove oops [SCSI] 3w-9xxx: add MSI support and misc fixes [SCSI] scsi_lib: use blk_rq_tagged in scsi_request_fn [SCSI] ibmvfc: Update driver version to 1.0.1 [SCSI] ibmvfc: Add ADISC support [SCSI] ibmvfc: Miscellaneous fixes [SCSI] ibmvfc: Fix hang on module removal [SCSI] ibmvfc: Target refcounting fixes [SCSI] ibmvfc: Reduce unnecessary log noise [SCSI] sym53c8xx: free luntbl in sym_hcb_free [SCSI] scsi_scan.c: Release mutex in error handling code [SCSI] scsi_eh_prep_cmnd should save scmd->underflow [SCSI] sd: Support for SCSI disk (SBC) Data Integrity Field ...
This commit is contained in:
@@ -147,9 +147,12 @@ static struct priority_group *alloc_priority_group(void)
|
||||
static void free_pgpaths(struct list_head *pgpaths, struct dm_target *ti)
|
||||
{
|
||||
struct pgpath *pgpath, *tmp;
|
||||
struct multipath *m = ti->private;
|
||||
|
||||
list_for_each_entry_safe(pgpath, tmp, pgpaths, list) {
|
||||
list_del(&pgpath->list);
|
||||
if (m->hw_handler_name)
|
||||
scsi_dh_detach(bdev_get_queue(pgpath->path.dev->bdev));
|
||||
dm_put_device(ti, pgpath->path.dev);
|
||||
free_pgpath(pgpath);
|
||||
}
|
||||
@@ -548,6 +551,7 @@ static struct pgpath *parse_path(struct arg_set *as, struct path_selector *ps,
|
||||
{
|
||||
int r;
|
||||
struct pgpath *p;
|
||||
struct multipath *m = ti->private;
|
||||
|
||||
/* we need at least a path arg */
|
||||
if (as->argc < 1) {
|
||||
@@ -566,6 +570,15 @@ static struct pgpath *parse_path(struct arg_set *as, struct path_selector *ps,
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if (m->hw_handler_name) {
|
||||
r = scsi_dh_attach(bdev_get_queue(p->path.dev->bdev),
|
||||
m->hw_handler_name);
|
||||
if (r < 0) {
|
||||
dm_put_device(ti, p->path.dev);
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
|
||||
r = ps->type->add_path(ps, &p->path, as->argc, as->argv, &ti->error);
|
||||
if (r) {
|
||||
dm_put_device(ti, p->path.dev);
|
||||
|
||||
@@ -273,12 +273,12 @@ mpt_fault_reset_work(struct work_struct *work)
|
||||
ioc_raw_state = mpt_GetIocState(ioc, 0);
|
||||
if ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT) {
|
||||
printk(MYIOC_s_WARN_FMT "IOC is in FAULT state (%04xh)!!!\n",
|
||||
ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK);
|
||||
ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK);
|
||||
printk(MYIOC_s_WARN_FMT "Issuing HardReset from %s!!\n",
|
||||
ioc->name, __FUNCTION__);
|
||||
ioc->name, __func__);
|
||||
rc = mpt_HardResetHandler(ioc, CAN_SLEEP);
|
||||
printk(MYIOC_s_WARN_FMT "%s: HardReset: %s\n", ioc->name,
|
||||
__FUNCTION__, (rc == 0) ? "success" : "failed");
|
||||
__func__, (rc == 0) ? "success" : "failed");
|
||||
ioc_raw_state = mpt_GetIocState(ioc, 0);
|
||||
if ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT)
|
||||
printk(MYIOC_s_WARN_FMT "IOC is in FAULT state after "
|
||||
@@ -356,7 +356,7 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa)
|
||||
if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS ||
|
||||
MptCallbacks[cb_idx] == NULL) {
|
||||
printk(MYIOC_s_WARN_FMT "%s: Invalid cb_idx (%d)!\n",
|
||||
__FUNCTION__, ioc->name, cb_idx);
|
||||
__func__, ioc->name, cb_idx);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
|
||||
if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS ||
|
||||
MptCallbacks[cb_idx] == NULL) {
|
||||
printk(MYIOC_s_WARN_FMT "%s: Invalid cb_idx (%d)!\n",
|
||||
__FUNCTION__, ioc->name, cb_idx);
|
||||
__func__, ioc->name, cb_idx);
|
||||
freeme = 0;
|
||||
goto out;
|
||||
}
|
||||
@@ -2434,7 +2434,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
|
||||
|
||||
if (ioc->cached_fw != NULL) {
|
||||
ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: Pushing FW onto "
|
||||
"adapter\n", __FUNCTION__, ioc->name));
|
||||
"adapter\n", __func__, ioc->name));
|
||||
if ((ret = mpt_downloadboot(ioc, (MpiFwHeader_t *)
|
||||
ioc->cached_fw, CAN_SLEEP)) < 0) {
|
||||
printk(MYIOC_s_WARN_FMT
|
||||
@@ -3693,7 +3693,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
|
||||
|
||||
if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078) {
|
||||
drsprintk(ioc, printk(MYIOC_s_WARN_FMT "%s: Doorbell=%p; 1078 reset "
|
||||
"address=%p\n", ioc->name, __FUNCTION__,
|
||||
"address=%p\n", ioc->name, __func__,
|
||||
&ioc->chip->Doorbell, &ioc->chip->Reset_1078));
|
||||
CHIPREG_WRITE32(&ioc->chip->Reset_1078, 0x07);
|
||||
if (sleepFlag == CAN_SLEEP)
|
||||
@@ -4742,12 +4742,12 @@ mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
|
||||
break;
|
||||
}
|
||||
|
||||
printk("%s: persist_opcode=%x\n",__FUNCTION__, persist_opcode);
|
||||
printk("%s: persist_opcode=%x\n",__func__, persist_opcode);
|
||||
|
||||
/* Get a MF for this command.
|
||||
*/
|
||||
if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
|
||||
printk("%s: no msg frames!\n",__FUNCTION__);
|
||||
printk("%s: no msg frames!\n",__func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -4771,13 +4771,13 @@ mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
|
||||
(SasIoUnitControlReply_t *)ioc->persist_reply_frame;
|
||||
if (le16_to_cpu(sasIoUnitCntrReply->IOCStatus) != MPI_IOCSTATUS_SUCCESS) {
|
||||
printk("%s: IOCStatus=0x%X IOCLogInfo=0x%X\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
sasIoUnitCntrReply->IOCStatus,
|
||||
sasIoUnitCntrReply->IOCLogInfo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
printk("%s: success\n",__FUNCTION__);
|
||||
printk("%s: success\n",__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5784,7 +5784,7 @@ SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp)
|
||||
|
||||
if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
|
||||
ioc->name,__FUNCTION__));
|
||||
ioc->name,__func__));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
|
||||
event = le32_to_cpu(pEvReply->Event) & 0xFF;
|
||||
|
||||
dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s() called\n",
|
||||
ioc->name, __FUNCTION__));
|
||||
ioc->name, __func__));
|
||||
if(async_queue == NULL)
|
||||
return 1;
|
||||
|
||||
@@ -2482,7 +2482,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
|
||||
*/
|
||||
if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
|
||||
ioc->name,__FUNCTION__));
|
||||
ioc->name,__func__));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@@ -231,28 +231,28 @@ static int
|
||||
mptfc_abort(struct scsi_cmnd *SCpnt)
|
||||
{
|
||||
return
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_abort, __FUNCTION__);
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_abort, __func__);
|
||||
}
|
||||
|
||||
static int
|
||||
mptfc_dev_reset(struct scsi_cmnd *SCpnt)
|
||||
{
|
||||
return
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_dev_reset, __FUNCTION__);
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_dev_reset, __func__);
|
||||
}
|
||||
|
||||
static int
|
||||
mptfc_bus_reset(struct scsi_cmnd *SCpnt)
|
||||
{
|
||||
return
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_bus_reset, __FUNCTION__);
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_bus_reset, __func__);
|
||||
}
|
||||
|
||||
static int
|
||||
mptfc_host_reset(struct scsi_cmnd *SCpnt)
|
||||
{
|
||||
return
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_host_reset, __FUNCTION__);
|
||||
mptfc_block_error_handler(SCpnt, mptscsih_host_reset, __func__);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -610,7 +610,7 @@ mpt_lan_send_turbo(struct net_device *dev, u32 tmsg)
|
||||
|
||||
dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
|
||||
IOC_AND_NETDEV_NAMES_s_s(dev),
|
||||
__FUNCTION__, sent));
|
||||
__func__, sent));
|
||||
|
||||
priv->SendCtl[ctx].skb = NULL;
|
||||
pci_unmap_single(mpt_dev->pcidev, priv->SendCtl[ctx].dma,
|
||||
@@ -676,7 +676,7 @@ mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep)
|
||||
|
||||
dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
|
||||
IOC_AND_NETDEV_NAMES_s_s(dev),
|
||||
__FUNCTION__, sent));
|
||||
__func__, sent));
|
||||
|
||||
priv->SendCtl[ctx].skb = NULL;
|
||||
pci_unmap_single(mpt_dev->pcidev, priv->SendCtl[ctx].dma,
|
||||
@@ -715,7 +715,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
|
||||
u16 cur_naa = 0x1000;
|
||||
|
||||
dioprintk((KERN_INFO MYNAM ": %s called, skb_addr = %p\n",
|
||||
__FUNCTION__, skb));
|
||||
__func__, skb));
|
||||
|
||||
spin_lock_irqsave(&priv->txfidx_lock, flags);
|
||||
if (priv->mpt_txfidx_tail < 0) {
|
||||
@@ -723,7 +723,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
|
||||
spin_unlock_irqrestore(&priv->txfidx_lock, flags);
|
||||
|
||||
printk (KERN_ERR "%s: no tx context available: %u\n",
|
||||
__FUNCTION__, priv->mpt_txfidx_tail);
|
||||
__func__, priv->mpt_txfidx_tail);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -733,7 +733,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
|
||||
spin_unlock_irqrestore(&priv->txfidx_lock, flags);
|
||||
|
||||
printk (KERN_ERR "%s: Unable to alloc request frame\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1208,7 +1208,7 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
|
||||
|
||||
dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, Start_buckets = %u, buckets_out = %u\n",
|
||||
IOC_AND_NETDEV_NAMES_s_s(dev),
|
||||
__FUNCTION__, buckets, curr));
|
||||
__func__, buckets, curr));
|
||||
|
||||
max = (mpt_dev->req_sz - MPT_LAN_RECEIVE_POST_REQUEST_SIZE) /
|
||||
(MPT_LAN_TRANSACTION32_SIZE + sizeof(SGESimple64_t));
|
||||
@@ -1217,9 +1217,9 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
|
||||
mf = mpt_get_msg_frame(LanCtx, mpt_dev);
|
||||
if (mf == NULL) {
|
||||
printk (KERN_ERR "%s: Unable to alloc request frame\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
dioprintk((KERN_ERR "%s: %u buckets remaining\n",
|
||||
__FUNCTION__, buckets));
|
||||
__func__, buckets));
|
||||
goto out;
|
||||
}
|
||||
pRecvReq = (LANReceivePostRequest_t *) mf;
|
||||
@@ -1244,7 +1244,7 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
|
||||
spin_lock_irqsave(&priv->rxfidx_lock, flags);
|
||||
if (priv->mpt_rxfidx_tail < 0) {
|
||||
printk (KERN_ERR "%s: Can't alloc context\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
spin_unlock_irqrestore(&priv->rxfidx_lock,
|
||||
flags);
|
||||
break;
|
||||
@@ -1267,7 +1267,7 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
|
||||
if (skb == NULL) {
|
||||
printk (KERN_WARNING
|
||||
MYNAM "/%s: Can't alloc skb\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
priv->mpt_rxfidx[++priv->mpt_rxfidx_tail] = ctx;
|
||||
spin_unlock_irqrestore(&priv->rxfidx_lock, flags);
|
||||
break;
|
||||
@@ -1305,7 +1305,7 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
|
||||
|
||||
if (pSimple == NULL) {
|
||||
/**/ printk (KERN_WARNING MYNAM "/%s: No buckets posted\n",
|
||||
/**/ __FUNCTION__);
|
||||
/**/ __func__);
|
||||
mpt_free_msg_frame(mpt_dev, mf);
|
||||
goto out;
|
||||
}
|
||||
@@ -1329,9 +1329,9 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
|
||||
|
||||
out:
|
||||
dioprintk((KERN_INFO MYNAM "/%s: End_buckets = %u, priv->buckets_out = %u\n",
|
||||
__FUNCTION__, buckets, atomic_read(&priv->buckets_out)));
|
||||
__func__, buckets, atomic_read(&priv->buckets_out)));
|
||||
dioprintk((KERN_INFO MYNAM "/%s: Posted %u buckets and received %u back\n",
|
||||
__FUNCTION__, priv->total_posted, priv->total_received));
|
||||
__func__, priv->total_posted, priv->total_received));
|
||||
|
||||
clear_bit(0, &priv->post_buckets_active);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_detai
|
||||
phy_info = port_info->phy_info;
|
||||
|
||||
dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: [%p]: num_phys=%02d "
|
||||
"bitmask=0x%016llX\n", ioc->name, __FUNCTION__, port_details,
|
||||
"bitmask=0x%016llX\n", ioc->name, __func__, port_details,
|
||||
port_details->num_phys, (unsigned long long)
|
||||
port_details->phy_bitmask));
|
||||
|
||||
@@ -411,7 +411,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
|
||||
*/
|
||||
dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"%s: [%p]: deleting phy = %d\n",
|
||||
ioc->name, __FUNCTION__, port_details, i));
|
||||
ioc->name, __func__, port_details, i));
|
||||
port_details->num_phys--;
|
||||
port_details->phy_bitmask &= ~ (1 << phy_info->phy_id);
|
||||
memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
|
||||
@@ -497,7 +497,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
|
||||
continue;
|
||||
dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"%s: [%p]: phy_id=%02d num_phys=%02d "
|
||||
"bitmask=0x%016llX\n", ioc->name, __FUNCTION__,
|
||||
"bitmask=0x%016llX\n", ioc->name, __func__,
|
||||
port_details, i, port_details->num_phys,
|
||||
(unsigned long long)port_details->phy_bitmask));
|
||||
dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tport = %p rphy=%p\n",
|
||||
@@ -553,7 +553,7 @@ mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
|
||||
|
||||
if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n",
|
||||
ioc->name,__FUNCTION__, __LINE__));
|
||||
ioc->name,__func__, __LINE__));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@ mptsas_target_reset_queue(MPT_ADAPTER *ioc,
|
||||
GFP_ATOMIC);
|
||||
if (!target_reset_list) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
|
||||
ioc->name,__FUNCTION__, __LINE__));
|
||||
ioc->name,__func__, __LINE__));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ mptsas_dev_reset_complete(MPT_ADAPTER *ioc)
|
||||
ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
|
||||
if (!ev) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
|
||||
ioc->name,__FUNCTION__, __LINE__));
|
||||
ioc->name,__func__, __LINE__));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1183,7 +1183,7 @@ static int mptsas_phy_reset(struct sas_phy *phy, int hard_reset)
|
||||
reply = (SasIoUnitControlReply_t *)ioc->sas_mgmt.reply;
|
||||
if (reply->IOCStatus != MPI_IOCSTATUS_SUCCESS) {
|
||||
printk(MYIOC_s_INFO_FMT "%s: IOCStatus=0x%X IOCLogInfo=0x%X\n",
|
||||
ioc->name, __FUNCTION__, reply->IOCStatus, reply->IOCLogInfo);
|
||||
ioc->name, __func__, reply->IOCStatus, reply->IOCLogInfo);
|
||||
error = -ENXIO;
|
||||
goto out_unlock;
|
||||
}
|
||||
@@ -1270,14 +1270,14 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
|
||||
|
||||
if (!rsp) {
|
||||
printk(MYIOC_s_ERR_FMT "%s: the smp response space is missing\n",
|
||||
ioc->name, __FUNCTION__);
|
||||
ioc->name, __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* do we need to support multiple segments? */
|
||||
if (req->bio->bi_vcnt > 1 || rsp->bio->bi_vcnt > 1) {
|
||||
printk(MYIOC_s_ERR_FMT "%s: multiple segments req %u %u, rsp %u %u\n",
|
||||
ioc->name, __FUNCTION__, req->bio->bi_vcnt, req->data_len,
|
||||
ioc->name, __func__, req->bio->bi_vcnt, req->data_len,
|
||||
rsp->bio->bi_vcnt, rsp->data_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1343,7 +1343,7 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
|
||||
|
||||
timeleft = wait_for_completion_timeout(&ioc->sas_mgmt.done, 10 * HZ);
|
||||
if (!timeleft) {
|
||||
printk(MYIOC_s_ERR_FMT "%s: smp timeout!\n", ioc->name, __FUNCTION__);
|
||||
printk(MYIOC_s_ERR_FMT "%s: smp timeout!\n", ioc->name, __func__);
|
||||
/* On timeout reset the board */
|
||||
mpt_HardResetHandler(ioc, CAN_SLEEP);
|
||||
ret = -ETIMEDOUT;
|
||||
@@ -1361,7 +1361,7 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
|
||||
rsp->data_len -= smprep->ResponseDataLength;
|
||||
} else {
|
||||
printk(MYIOC_s_ERR_FMT "%s: smp passthru reply failed to be returned\n",
|
||||
ioc->name, __FUNCTION__);
|
||||
ioc->name, __func__);
|
||||
ret = -ENXIO;
|
||||
}
|
||||
unmap:
|
||||
@@ -2006,7 +2006,7 @@ static int mptsas_probe_one_phy(struct device *dev,
|
||||
if (error) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
goto out;
|
||||
}
|
||||
mptsas_set_port(ioc, phy_info, port);
|
||||
@@ -2076,7 +2076,7 @@ static int mptsas_probe_one_phy(struct device *dev,
|
||||
if (!rphy) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -2085,7 +2085,7 @@ static int mptsas_probe_one_phy(struct device *dev,
|
||||
if (error) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
sas_rphy_free(rphy);
|
||||
goto out;
|
||||
}
|
||||
@@ -2613,7 +2613,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
(ev->channel << 8) + ev->id)) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
phy_info = mptsas_find_phyinfo_by_sas_address(
|
||||
@@ -2633,20 +2633,20 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!phy_info){
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
if (!phy_info->port_details) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
rphy = mptsas_get_rphy(phy_info);
|
||||
if (!rphy) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2654,7 +2654,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!port) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2665,7 +2665,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!vtarget) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2720,7 +2720,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
(ev->channel << 8) + ev->id)) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2732,7 +2732,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!phy_info || !phy_info->port_details) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2744,7 +2744,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!vtarget) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
/*
|
||||
@@ -2767,7 +2767,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (mptsas_get_rphy(phy_info)) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
if (ev->channel) printk("%d\n", __LINE__);
|
||||
break;
|
||||
}
|
||||
@@ -2776,7 +2776,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!port) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break;
|
||||
}
|
||||
memcpy(&phy_info->attached, &sas_device,
|
||||
@@ -2801,7 +2801,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (!rphy) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
break; /* non-fatal: an rphy can be added later */
|
||||
}
|
||||
|
||||
@@ -2809,7 +2809,7 @@ mptsas_hotplug_work(struct work_struct *work)
|
||||
if (sas_rphy_add(rphy)) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
|
||||
"%s: exit at line=%d\n", ioc->name,
|
||||
__FUNCTION__, __LINE__));
|
||||
__func__, __LINE__));
|
||||
sas_rphy_free(rphy);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ mptscsih_issue_sep_command(MPT_ADAPTER *ioc, VirtTarget *vtarget,
|
||||
|
||||
if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
|
||||
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s: no msg frames!!\n",
|
||||
ioc->name,__FUNCTION__));
|
||||
ioc->name,__func__));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2187,7 +2187,7 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m
|
||||
(ioc->debug_level & MPT_DEBUG_TM ))
|
||||
printk("%s: ha=%d [%d:%d:0] task_type=0x%02X "
|
||||
"iocstatus=0x%04X\n\tloginfo=0x%08X response_code=0x%02X "
|
||||
"term_cmnds=%d\n", __FUNCTION__, ioc->id, pScsiTmReply->Bus,
|
||||
"term_cmnds=%d\n", __func__, ioc->id, pScsiTmReply->Bus,
|
||||
pScsiTmReply->TargetID, pScsiTmReq->TaskType,
|
||||
le16_to_cpu(pScsiTmReply->IOCStatus),
|
||||
le32_to_cpu(pScsiTmReply->IOCLogInfo),pScsiTmReply->ResponseCode,
|
||||
|
||||
+30
-10
@@ -4,7 +4,7 @@
|
||||
Written By: Adam Radford <linuxraid@amcc.com>
|
||||
Modifications By: Tom Couch <linuxraid@amcc.com>
|
||||
|
||||
Copyright (C) 2004-2007 Applied Micro Circuits Corporation.
|
||||
Copyright (C) 2004-2008 Applied Micro Circuits Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -71,6 +71,10 @@
|
||||
Add support for 9650SE controllers.
|
||||
2.26.02.009 - Fix dma mask setting to fallback to 32-bit if 64-bit fails.
|
||||
2.26.02.010 - Add support for 9690SA controllers.
|
||||
2.26.02.011 - Increase max AENs drained to 256.
|
||||
Add MSI support and "use_msi" module parameter.
|
||||
Fix bug in twa_get_param() on 4GB+.
|
||||
Use pci_resource_len() for ioremap().
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -95,7 +99,7 @@
|
||||
#include "3w-9xxx.h"
|
||||
|
||||
/* Globals */
|
||||
#define TW_DRIVER_VERSION "2.26.02.010"
|
||||
#define TW_DRIVER_VERSION "2.26.02.011"
|
||||
static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
|
||||
static unsigned int twa_device_extension_count;
|
||||
static int twa_major = -1;
|
||||
@@ -107,6 +111,10 @@ MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(TW_DRIVER_VERSION);
|
||||
|
||||
static int use_msi = 0;
|
||||
module_param(use_msi, int, S_IRUGO);
|
||||
MODULE_PARM_DESC(use_msi, "Use Message Signaled Interrupts. Default: 0");
|
||||
|
||||
/* Function prototypes */
|
||||
static void twa_aen_queue_event(TW_Device_Extension *tw_dev, TW_Command_Apache_Header *header);
|
||||
static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id);
|
||||
@@ -1038,7 +1046,6 @@ static void *twa_get_param(TW_Device_Extension *tw_dev, int request_id, int tabl
|
||||
TW_Command_Full *full_command_packet;
|
||||
TW_Command *command_packet;
|
||||
TW_Param_Apache *param;
|
||||
unsigned long param_value;
|
||||
void *retval = NULL;
|
||||
|
||||
/* Setup the command packet */
|
||||
@@ -1057,9 +1064,8 @@ static void *twa_get_param(TW_Device_Extension *tw_dev, int request_id, int tabl
|
||||
param->table_id = cpu_to_le16(table_id | 0x8000);
|
||||
param->parameter_id = cpu_to_le16(parameter_id);
|
||||
param->parameter_size_bytes = cpu_to_le16(parameter_size_bytes);
|
||||
param_value = tw_dev->generic_buffer_phys[request_id];
|
||||
|
||||
command_packet->byte8_offset.param.sgl[0].address = TW_CPU_TO_SGL(param_value);
|
||||
command_packet->byte8_offset.param.sgl[0].address = TW_CPU_TO_SGL(tw_dev->generic_buffer_phys[request_id]);
|
||||
command_packet->byte8_offset.param.sgl[0].length = cpu_to_le32(TW_SECTOR_SIZE);
|
||||
|
||||
/* Post the command packet to the board */
|
||||
@@ -2000,7 +2006,7 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
|
||||
{
|
||||
struct Scsi_Host *host = NULL;
|
||||
TW_Device_Extension *tw_dev;
|
||||
u32 mem_addr;
|
||||
unsigned long mem_addr, mem_len;
|
||||
int retval = -ENODEV;
|
||||
|
||||
retval = pci_enable_device(pdev);
|
||||
@@ -2045,13 +2051,16 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
|
||||
goto out_free_device_extension;
|
||||
}
|
||||
|
||||
if (pdev->device == PCI_DEVICE_ID_3WARE_9000)
|
||||
if (pdev->device == PCI_DEVICE_ID_3WARE_9000) {
|
||||
mem_addr = pci_resource_start(pdev, 1);
|
||||
else
|
||||
mem_len = pci_resource_len(pdev, 1);
|
||||
} else {
|
||||
mem_addr = pci_resource_start(pdev, 2);
|
||||
mem_len = pci_resource_len(pdev, 2);
|
||||
}
|
||||
|
||||
/* Save base address */
|
||||
tw_dev->base_addr = ioremap(mem_addr, PAGE_SIZE);
|
||||
tw_dev->base_addr = ioremap(mem_addr, mem_len);
|
||||
if (!tw_dev->base_addr) {
|
||||
TW_PRINTK(tw_dev->host, TW_DRIVER, 0x35, "Failed to ioremap");
|
||||
goto out_release_mem_region;
|
||||
@@ -2086,7 +2095,7 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
|
||||
|
||||
pci_set_drvdata(pdev, host);
|
||||
|
||||
printk(KERN_WARNING "3w-9xxx: scsi%d: Found a 3ware 9000 Storage Controller at 0x%x, IRQ: %d.\n",
|
||||
printk(KERN_WARNING "3w-9xxx: scsi%d: Found a 3ware 9000 Storage Controller at 0x%lx, IRQ: %d.\n",
|
||||
host->host_no, mem_addr, pdev->irq);
|
||||
printk(KERN_WARNING "3w-9xxx: scsi%d: Firmware %s, BIOS %s, Ports: %d.\n",
|
||||
host->host_no,
|
||||
@@ -2097,6 +2106,11 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
|
||||
le32_to_cpu(*(int *)twa_get_param(tw_dev, 2, TW_INFORMATION_TABLE,
|
||||
TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH)));
|
||||
|
||||
/* Try to enable MSI */
|
||||
if (use_msi && (pdev->device != PCI_DEVICE_ID_3WARE_9000) &&
|
||||
!pci_enable_msi(pdev))
|
||||
set_bit(TW_USING_MSI, &tw_dev->flags);
|
||||
|
||||
/* Now setup the interrupt handler */
|
||||
retval = request_irq(pdev->irq, twa_interrupt, IRQF_SHARED, "3w-9xxx", tw_dev);
|
||||
if (retval) {
|
||||
@@ -2120,6 +2134,8 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
|
||||
return 0;
|
||||
|
||||
out_remove_host:
|
||||
if (test_bit(TW_USING_MSI, &tw_dev->flags))
|
||||
pci_disable_msi(pdev);
|
||||
scsi_remove_host(host);
|
||||
out_iounmap:
|
||||
iounmap(tw_dev->base_addr);
|
||||
@@ -2151,6 +2167,10 @@ static void twa_remove(struct pci_dev *pdev)
|
||||
/* Shutdown the card */
|
||||
__twa_shutdown(tw_dev);
|
||||
|
||||
/* Disable MSI if enabled */
|
||||
if (test_bit(TW_USING_MSI, &tw_dev->flags))
|
||||
pci_disable_msi(pdev);
|
||||
|
||||
/* Free IO remapping */
|
||||
iounmap(tw_dev->base_addr);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Written By: Adam Radford <linuxraid@amcc.com>
|
||||
Modifications By: Tom Couch <linuxraid@amcc.com>
|
||||
|
||||
Copyright (C) 2004-2007 Applied Micro Circuits Corporation.
|
||||
Copyright (C) 2004-2008 Applied Micro Circuits Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -319,8 +319,8 @@ static twa_message_type twa_error_table[] = {
|
||||
|
||||
/* Compatibility defines */
|
||||
#define TW_9000_ARCH_ID 0x5
|
||||
#define TW_CURRENT_DRIVER_SRL 30
|
||||
#define TW_CURRENT_DRIVER_BUILD 80
|
||||
#define TW_CURRENT_DRIVER_SRL 35
|
||||
#define TW_CURRENT_DRIVER_BUILD 0
|
||||
#define TW_CURRENT_DRIVER_BRANCH 0
|
||||
|
||||
/* Phase defines */
|
||||
@@ -352,8 +352,9 @@ static twa_message_type twa_error_table[] = {
|
||||
#define TW_MAX_RESET_TRIES 2
|
||||
#define TW_MAX_CMDS_PER_LUN 254
|
||||
#define TW_MAX_RESPONSE_DRAIN 256
|
||||
#define TW_MAX_AEN_DRAIN 40
|
||||
#define TW_MAX_AEN_DRAIN 255
|
||||
#define TW_IN_RESET 2
|
||||
#define TW_USING_MSI 3
|
||||
#define TW_IN_ATTENTION_LOOP 4
|
||||
#define TW_MAX_SECTORS 256
|
||||
#define TW_AEN_WAIT_TIME 1000
|
||||
|
||||
@@ -63,6 +63,7 @@ comment "SCSI support type (disk, tape, CD-ROM)"
|
||||
config BLK_DEV_SD
|
||||
tristate "SCSI disk support"
|
||||
depends on SCSI
|
||||
select CRC_T10DIF
|
||||
---help---
|
||||
If you want to use SCSI hard disks, Fibre Channel disks,
|
||||
Serial ATA (SATA) or Parallel ATA (PATA) hard disks,
|
||||
|
||||
@@ -151,6 +151,8 @@ scsi_mod-$(CONFIG_SCSI_PROC_FS) += scsi_proc.o
|
||||
scsi_tgt-y += scsi_tgt_lib.o scsi_tgt_if.o
|
||||
|
||||
sd_mod-objs := sd.o
|
||||
sd_mod-$(CONFIG_BLK_DEV_INTEGRITY) += sd_dif.o
|
||||
|
||||
sr_mod-objs := sr.o sr_ioctl.o sr_vendor.o
|
||||
ncr53c8xx-flags-$(CONFIG_SCSI_ZALON) \
|
||||
:= -DCONFIG_NCR53C8XX_PREFETCH -DSCSI_NCR_BIG_ENDIAN \
|
||||
|
||||
@@ -2278,7 +2278,7 @@ do { \
|
||||
#define ASC_DBG(lvl, format, arg...) { \
|
||||
if (asc_dbglvl >= (lvl)) \
|
||||
printk(KERN_DEBUG "%s: %s: " format, DRV_NAME, \
|
||||
__FUNCTION__ , ## arg); \
|
||||
__func__ , ## arg); \
|
||||
}
|
||||
|
||||
#define ASC_DBG_PRT_SCSI_HOST(lvl, s) \
|
||||
|
||||
@@ -288,20 +288,20 @@ static LIST_HEAD(aha152x_host_list);
|
||||
#define DO_LOCK(flags) \
|
||||
do { \
|
||||
if(spin_is_locked(&QLOCK)) { \
|
||||
DPRINTK(debug_intr, DEBUG_LEAD "(%s:%d) already locked at %s:%d\n", CMDINFO(CURRENT_SC), __FUNCTION__, __LINE__, QLOCKER, QLOCKERL); \
|
||||
DPRINTK(debug_intr, DEBUG_LEAD "(%s:%d) already locked at %s:%d\n", CMDINFO(CURRENT_SC), __func__, __LINE__, QLOCKER, QLOCKERL); \
|
||||
} \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) locking\n", CMDINFO(CURRENT_SC), __FUNCTION__, __LINE__); \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) locking\n", CMDINFO(CURRENT_SC), __func__, __LINE__); \
|
||||
spin_lock_irqsave(&QLOCK,flags); \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) locked\n", CMDINFO(CURRENT_SC), __FUNCTION__, __LINE__); \
|
||||
QLOCKER=__FUNCTION__; \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) locked\n", CMDINFO(CURRENT_SC), __func__, __LINE__); \
|
||||
QLOCKER=__func__; \
|
||||
QLOCKERL=__LINE__; \
|
||||
} while(0)
|
||||
|
||||
#define DO_UNLOCK(flags) \
|
||||
do { \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) unlocking (locked at %s:%d)\n", CMDINFO(CURRENT_SC), __FUNCTION__, __LINE__, QLOCKER, QLOCKERL); \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) unlocking (locked at %s:%d)\n", CMDINFO(CURRENT_SC), __func__, __LINE__, QLOCKER, QLOCKERL); \
|
||||
spin_unlock_irqrestore(&QLOCK,flags); \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) unlocked\n", CMDINFO(CURRENT_SC), __FUNCTION__, __LINE__); \
|
||||
DPRINTK(debug_locking, DEBUG_LEAD "(%s:%d) unlocked\n", CMDINFO(CURRENT_SC), __func__, __LINE__); \
|
||||
QLOCKER="(not locked)"; \
|
||||
QLOCKERL=0; \
|
||||
} while(0)
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
#ifdef ASD_ENTER_EXIT
|
||||
#define ENTER printk(KERN_NOTICE "%s: ENTER %s\n", ASD_DRIVER_NAME, \
|
||||
__FUNCTION__)
|
||||
__func__)
|
||||
#define EXIT printk(KERN_NOTICE "%s: --EXIT %s\n", ASD_DRIVER_NAME, \
|
||||
__FUNCTION__)
|
||||
__func__)
|
||||
#else
|
||||
#define ENTER
|
||||
#define EXIT
|
||||
|
||||
@@ -1359,7 +1359,7 @@ int asd_enable_phys(struct asd_ha_struct *asd_ha, const u8 phy_mask)
|
||||
struct asd_ascb *ascb_list;
|
||||
|
||||
if (!phy_mask) {
|
||||
asd_printk("%s called with phy_mask of 0!?\n", __FUNCTION__);
|
||||
asd_printk("%s called with phy_mask of 0!?\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ static void asd_form_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
|
||||
phy->asd_port = port;
|
||||
}
|
||||
ASD_DPRINTK("%s: updating phy_mask 0x%x for phy%d\n",
|
||||
__FUNCTION__, phy->asd_port->phy_mask, sas_phy->id);
|
||||
__func__, phy->asd_port->phy_mask, sas_phy->id);
|
||||
asd_update_port_links(asd_ha, phy);
|
||||
spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags);
|
||||
}
|
||||
@@ -294,7 +294,7 @@ static void asd_link_reset_err_tasklet(struct asd_ascb *ascb,
|
||||
struct asd_ascb *cp = asd_ascb_alloc_list(ascb->ha, &num,
|
||||
GFP_ATOMIC);
|
||||
if (!cp) {
|
||||
asd_printk("%s: out of memory\n", __FUNCTION__);
|
||||
asd_printk("%s: out of memory\n", __func__);
|
||||
goto out;
|
||||
}
|
||||
ASD_DPRINTK("phy%d: retries:0 performing link reset seq\n",
|
||||
@@ -446,7 +446,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
struct domain_device *failed_dev = NULL;
|
||||
|
||||
ASD_DPRINTK("%s: REQ_TASK_ABORT, reason=0x%X\n",
|
||||
__FUNCTION__, dl->status_block[3]);
|
||||
__func__, dl->status_block[3]);
|
||||
|
||||
/*
|
||||
* Find the task that caused the abort and abort it first.
|
||||
@@ -474,7 +474,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
|
||||
if (!failed_dev) {
|
||||
ASD_DPRINTK("%s: Can't find task (tc=%d) to abort!\n",
|
||||
__FUNCTION__, tc_abort);
|
||||
__func__, tc_abort);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
conn_handle = *((u16*)(&dl->status_block[1]));
|
||||
conn_handle = le16_to_cpu(conn_handle);
|
||||
|
||||
ASD_DPRINTK("%s: REQ_DEVICE_RESET, reason=0x%X\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: REQ_DEVICE_RESET, reason=0x%X\n", __func__,
|
||||
dl->status_block[3]);
|
||||
|
||||
/* Find the last pending task for the device... */
|
||||
@@ -522,7 +522,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
|
||||
if (!last_dev_task) {
|
||||
ASD_DPRINTK("%s: Device reset for idle device %d?\n",
|
||||
__FUNCTION__, conn_handle);
|
||||
__func__, conn_handle);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -549,10 +549,10 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
goto out;
|
||||
}
|
||||
case SIGNAL_NCQ_ERROR:
|
||||
ASD_DPRINTK("%s: SIGNAL_NCQ_ERROR\n", __FUNCTION__);
|
||||
ASD_DPRINTK("%s: SIGNAL_NCQ_ERROR\n", __func__);
|
||||
goto out;
|
||||
case CLEAR_NCQ_ERROR:
|
||||
ASD_DPRINTK("%s: CLEAR_NCQ_ERROR\n", __FUNCTION__);
|
||||
ASD_DPRINTK("%s: CLEAR_NCQ_ERROR\n", __func__);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -560,26 +560,26 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
|
||||
switch (sb_opcode) {
|
||||
case BYTES_DMAED:
|
||||
ASD_DPRINTK("%s: phy%d: BYTES_DMAED\n", __FUNCTION__, phy_id);
|
||||
ASD_DPRINTK("%s: phy%d: BYTES_DMAED\n", __func__, phy_id);
|
||||
asd_bytes_dmaed_tasklet(ascb, dl, edb, phy_id);
|
||||
break;
|
||||
case PRIMITIVE_RECVD:
|
||||
ASD_DPRINTK("%s: phy%d: PRIMITIVE_RECVD\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: phy%d: PRIMITIVE_RECVD\n", __func__,
|
||||
phy_id);
|
||||
asd_primitive_rcvd_tasklet(ascb, dl, phy_id);
|
||||
break;
|
||||
case PHY_EVENT:
|
||||
ASD_DPRINTK("%s: phy%d: PHY_EVENT\n", __FUNCTION__, phy_id);
|
||||
ASD_DPRINTK("%s: phy%d: PHY_EVENT\n", __func__, phy_id);
|
||||
asd_phy_event_tasklet(ascb, dl);
|
||||
break;
|
||||
case LINK_RESET_ERROR:
|
||||
ASD_DPRINTK("%s: phy%d: LINK_RESET_ERROR\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: phy%d: LINK_RESET_ERROR\n", __func__,
|
||||
phy_id);
|
||||
asd_link_reset_err_tasklet(ascb, dl, phy_id);
|
||||
break;
|
||||
case TIMER_EVENT:
|
||||
ASD_DPRINTK("%s: phy%d: TIMER_EVENT, lost dw sync\n",
|
||||
__FUNCTION__, phy_id);
|
||||
__func__, phy_id);
|
||||
asd_turn_led(asd_ha, phy_id, 0);
|
||||
/* the device is gone */
|
||||
sas_phy_disconnected(sas_phy);
|
||||
@@ -587,7 +587,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
|
||||
sas_ha->notify_port_event(sas_phy, PORTE_TIMER_EVENT);
|
||||
break;
|
||||
default:
|
||||
ASD_DPRINTK("%s: phy%d: unknown event:0x%x\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: phy%d: unknown event:0x%x\n", __func__,
|
||||
phy_id, sb_opcode);
|
||||
ASD_DPRINTK("edb is 0x%x! dl->opcode is 0x%x\n",
|
||||
edb, dl->opcode);
|
||||
@@ -654,7 +654,7 @@ static void control_phy_tasklet_complete(struct asd_ascb *ascb,
|
||||
|
||||
if (status != 0) {
|
||||
ASD_DPRINTK("%s: phy%d status block opcode:0x%x\n",
|
||||
__FUNCTION__, phy_id, status);
|
||||
__func__, phy_id, status);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ static void control_phy_tasklet_complete(struct asd_ascb *ascb,
|
||||
asd_ha->hw_prof.enabled_phys &= ~(1 << phy_id);
|
||||
asd_turn_led(asd_ha, phy_id, 0);
|
||||
asd_control_led(asd_ha, phy_id, 0);
|
||||
ASD_DPRINTK("%s: disable phy%d\n", __FUNCTION__, phy_id);
|
||||
ASD_DPRINTK("%s: disable phy%d\n", __func__, phy_id);
|
||||
break;
|
||||
|
||||
case ENABLE_PHY:
|
||||
@@ -673,40 +673,40 @@ static void control_phy_tasklet_complete(struct asd_ascb *ascb,
|
||||
get_lrate_mode(phy, oob_mode);
|
||||
asd_turn_led(asd_ha, phy_id, 1);
|
||||
ASD_DPRINTK("%s: phy%d, lrate:0x%x, proto:0x%x\n",
|
||||
__FUNCTION__, phy_id,phy->sas_phy.linkrate,
|
||||
__func__, phy_id,phy->sas_phy.linkrate,
|
||||
phy->sas_phy.iproto);
|
||||
} else if (oob_status & CURRENT_SPINUP_HOLD) {
|
||||
asd_ha->hw_prof.enabled_phys |= (1 << phy_id);
|
||||
asd_turn_led(asd_ha, phy_id, 1);
|
||||
ASD_DPRINTK("%s: phy%d, spinup hold\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: phy%d, spinup hold\n", __func__,
|
||||
phy_id);
|
||||
} else if (oob_status & CURRENT_ERR_MASK) {
|
||||
asd_turn_led(asd_ha, phy_id, 0);
|
||||
ASD_DPRINTK("%s: phy%d: error: oob status:0x%02x\n",
|
||||
__FUNCTION__, phy_id, oob_status);
|
||||
__func__, phy_id, oob_status);
|
||||
} else if (oob_status & (CURRENT_HOT_PLUG_CNCT
|
||||
| CURRENT_DEVICE_PRESENT)) {
|
||||
asd_ha->hw_prof.enabled_phys |= (1 << phy_id);
|
||||
asd_turn_led(asd_ha, phy_id, 1);
|
||||
ASD_DPRINTK("%s: phy%d: hot plug or device present\n",
|
||||
__FUNCTION__, phy_id);
|
||||
__func__, phy_id);
|
||||
} else {
|
||||
asd_ha->hw_prof.enabled_phys |= (1 << phy_id);
|
||||
asd_turn_led(asd_ha, phy_id, 0);
|
||||
ASD_DPRINTK("%s: phy%d: no device present: "
|
||||
"oob_status:0x%x\n",
|
||||
__FUNCTION__, phy_id, oob_status);
|
||||
__func__, phy_id, oob_status);
|
||||
}
|
||||
break;
|
||||
case RELEASE_SPINUP_HOLD:
|
||||
case PHY_NO_OP:
|
||||
case EXECUTE_HARD_RESET:
|
||||
ASD_DPRINTK("%s: phy%d: sub_func:0x%x\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: phy%d: sub_func:0x%x\n", __func__,
|
||||
phy_id, control_phy->sub_func);
|
||||
/* XXX finish */
|
||||
break;
|
||||
default:
|
||||
ASD_DPRINTK("%s: phy%d: sub_func:0x%x?\n", __FUNCTION__,
|
||||
ASD_DPRINTK("%s: phy%d: sub_func:0x%x?\n", __func__,
|
||||
phy_id, control_phy->sub_func);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ Again:
|
||||
case TC_RESUME:
|
||||
case TC_PARTIAL_SG_LIST:
|
||||
default:
|
||||
ASD_DPRINTK("%s: dl opcode: 0x%x?\n", __FUNCTION__, opcode);
|
||||
ASD_DPRINTK("%s: dl opcode: 0x%x?\n", __func__, opcode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,12 +75,12 @@ static void asd_clear_nexus_tasklet_complete(struct asd_ascb *ascb,
|
||||
struct done_list_struct *dl)
|
||||
{
|
||||
struct tasklet_completion_status *tcs = ascb->uldd_task;
|
||||
ASD_DPRINTK("%s: here\n", __FUNCTION__);
|
||||
ASD_DPRINTK("%s: here\n", __func__);
|
||||
if (!del_timer(&ascb->timer)) {
|
||||
ASD_DPRINTK("%s: couldn't delete timer\n", __FUNCTION__);
|
||||
ASD_DPRINTK("%s: couldn't delete timer\n", __func__);
|
||||
return;
|
||||
}
|
||||
ASD_DPRINTK("%s: opcode: 0x%x\n", __FUNCTION__, dl->opcode);
|
||||
ASD_DPRINTK("%s: opcode: 0x%x\n", __func__, dl->opcode);
|
||||
tcs->dl_opcode = dl->opcode;
|
||||
complete(ascb->completion);
|
||||
asd_ascb_free(ascb);
|
||||
@@ -91,7 +91,7 @@ static void asd_clear_nexus_timedout(unsigned long data)
|
||||
struct asd_ascb *ascb = (void *)data;
|
||||
struct tasklet_completion_status *tcs = ascb->uldd_task;
|
||||
|
||||
ASD_DPRINTK("%s: here\n", __FUNCTION__);
|
||||
ASD_DPRINTK("%s: here\n", __func__);
|
||||
tcs->dl_opcode = TMF_RESP_FUNC_FAILED;
|
||||
complete(ascb->completion);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ static void asd_clear_nexus_timedout(unsigned long data)
|
||||
DECLARE_COMPLETION_ONSTACK(completion); \
|
||||
DECLARE_TCS(tcs); \
|
||||
\
|
||||
ASD_DPRINTK("%s: PRE\n", __FUNCTION__); \
|
||||
ASD_DPRINTK("%s: PRE\n", __func__); \
|
||||
res = 1; \
|
||||
ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); \
|
||||
if (!ascb) \
|
||||
@@ -115,12 +115,12 @@ static void asd_clear_nexus_timedout(unsigned long data)
|
||||
scb->header.opcode = CLEAR_NEXUS
|
||||
|
||||
#define CLEAR_NEXUS_POST \
|
||||
ASD_DPRINTK("%s: POST\n", __FUNCTION__); \
|
||||
ASD_DPRINTK("%s: POST\n", __func__); \
|
||||
res = asd_enqueue_internal(ascb, asd_clear_nexus_tasklet_complete, \
|
||||
asd_clear_nexus_timedout); \
|
||||
if (res) \
|
||||
goto out_err; \
|
||||
ASD_DPRINTK("%s: clear nexus posted, waiting...\n", __FUNCTION__); \
|
||||
ASD_DPRINTK("%s: clear nexus posted, waiting...\n", __func__); \
|
||||
wait_for_completion(&completion); \
|
||||
res = tcs.dl_opcode; \
|
||||
if (res == TC_NO_ERROR) \
|
||||
@@ -417,7 +417,7 @@ int asd_abort_task(struct sas_task *task)
|
||||
if (task->task_state_flags & SAS_TASK_STATE_DONE) {
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
res = TMF_RESP_FUNC_COMPLETE;
|
||||
ASD_DPRINTK("%s: task 0x%p done\n", __FUNCTION__, task);
|
||||
ASD_DPRINTK("%s: task 0x%p done\n", __func__, task);
|
||||
goto out_done;
|
||||
}
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
@@ -481,7 +481,7 @@ int asd_abort_task(struct sas_task *task)
|
||||
if (task->task_state_flags & SAS_TASK_STATE_DONE) {
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
res = TMF_RESP_FUNC_COMPLETE;
|
||||
ASD_DPRINTK("%s: task 0x%p done\n", __FUNCTION__, task);
|
||||
ASD_DPRINTK("%s: task 0x%p done\n", __func__, task);
|
||||
goto out_done;
|
||||
}
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
|
||||
@@ -240,7 +240,7 @@ static void __fas216_checkmagic(FAS216_Info *info, const char *func)
|
||||
panic("scsi memory space corrupted in %s", func);
|
||||
}
|
||||
}
|
||||
#define fas216_checkmagic(info) __fas216_checkmagic((info), __FUNCTION__)
|
||||
#define fas216_checkmagic(info) __fas216_checkmagic((info), __func__)
|
||||
#else
|
||||
#define fas216_checkmagic(info)
|
||||
#endif
|
||||
@@ -2658,7 +2658,7 @@ int fas216_eh_host_reset(struct scsi_cmnd *SCpnt)
|
||||
fas216_checkmagic(info);
|
||||
|
||||
printk("scsi%d.%c: %s: resetting host\n",
|
||||
info->host->host_no, '0' + SCpnt->device->id, __FUNCTION__);
|
||||
info->host->host_no, '0' + SCpnt->device->id, __func__);
|
||||
|
||||
/*
|
||||
* Reset the SCSI chip.
|
||||
|
||||
@@ -930,6 +930,7 @@ static int ch_probe(struct device *dev)
|
||||
if (init)
|
||||
ch_init_elem(ch);
|
||||
|
||||
dev_set_drvdata(dev, ch);
|
||||
sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name);
|
||||
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user