Skip to content

Commit ad94717

Browse files
committed
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: (110 commits) [SCSI] qla2xxx: Refactor call to qla2xxx_read_sfp for thermal temperature. [SCSI] qla2xxx: Unify the read/write sfp mailbox command routines. [SCSI] qla2xxx: Clear complete initialization control block. [SCSI] qla2xxx: Allow an override of the registered maximum LUN. [SCSI] qla2xxx: Add host number in reset and quiescent message logs. [SCSI] qla2xxx: Correctly read sfp single byte mailbox register. [SCSI] qla2xxx: Add qla82xx_rom_unlock() function. [SCSI] qla2xxx: Log if qla82xx firmware fails to load from flash. [SCSI] qla2xxx: Use passed in host to initialize local scsi_qla_host in queuecommand function [SCSI] qla2xxx: Correct buffer start in edc sysfs debug print. [SCSI] qla2xxx: Update firmware version after flash update for ISP82xx. [SCSI] qla2xxx: Fix hang during driver unload when vport is active. [SCSI] qla2xxx: Properly set the dsd_list_len for dsd_chaining in cmd type 6. [SCSI] qla2xxx: Fix virtual port failing to login after chip reset. [SCSI] qla2xxx: Fix vport delete hang when logins are outstanding. [SCSI] hpsa: Change memset using sizeof(ptr) to sizeof(*ptr) [SCSI] ipr: Rate limit DMA mapping errors [SCSI] hpsa: add P2000 to list of shared SAS devices [SCSI] hpsa: do not attempt PCI power management reset method if we know it won't work. [SCSI] hpsa: remove superfluous sleeps around reset code ...
2 parents 6c1b8d9 + 6ad11ea commit ad94717

119 files changed

Lines changed: 6387 additions & 1679 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/scsi/LICENSE.qla2xxx‎

Lines changed: 287 additions & 5 deletions
Large diffs are not rendered by default.

‎MAINTAINERS‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5611,9 +5611,9 @@ F: include/linux/ata.h
56115611
F: include/linux/libata.h
56125612

56135613
SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
5614-
M: Jayamohan Kallickal <jayamohank@serverengines.com>
5614+
M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
56155615
L: linux-scsi@vger.kernel.org
5616-
W: http://www.serverengines.com
5616+
W: http://www.emulex.com
56175617
S: Supported
56185618
F: drivers/scsi/be2iscsi/
56195619

‎drivers/message/fusion/mptbase.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
#define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR
7777
#endif
7878

79-
#define MPT_LINUX_VERSION_COMMON "3.04.18"
80-
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.18"
79+
#define MPT_LINUX_VERSION_COMMON "3.04.19"
80+
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.19"
8181
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
8282

8383
#define show_mptmod_ver(s,ver) \

‎drivers/message/fusion/mptsas.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5012,7 +5012,6 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
50125012
(ioc_stat & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE)) {
50135013
VirtTarget *vtarget = NULL;
50145014
u8 id, channel;
5015-
u32 log_info = le32_to_cpu(reply->IOCLogInfo);
50165015

50175016
id = sas_event_data->TargetID;
50185017
channel = sas_event_data->Bus;
@@ -5023,7 +5022,8 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
50235022
"LogInfo (0x%x) available for "
50245023
"INTERNAL_DEVICE_RESET"
50255024
"fw_id %d fw_channel %d\n", ioc->name,
5026-
log_info, id, channel));
5025+
le32_to_cpu(reply->IOCLogInfo),
5026+
id, channel));
50275027
if (vtarget->raidVolume) {
50285028
devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
50295029
"Skipping Raid Volume for inDMD\n",

‎drivers/message/fusion/mptscsih.c‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,11 +1415,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
14151415
dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n",
14161416
ioc->name, SCpnt, done));
14171417

1418-
if (ioc->taskmgmt_quiesce_io) {
1419-
dtmprintk(ioc, printk(MYIOC_s_WARN_FMT "qcmd: SCpnt=%p timeout + 60HZ\n",
1420-
ioc->name, SCpnt));
1418+
if (ioc->taskmgmt_quiesce_io)
14211419
return SCSI_MLQUEUE_HOST_BUSY;
1422-
}
14231420

14241421
/*
14251422
* Put together a MPT SCSI request...
@@ -1773,7 +1770,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
17731770
int scpnt_idx;
17741771
int retval;
17751772
VirtDevice *vdevice;
1776-
ulong sn = SCpnt->serial_number;
17771773
MPT_ADAPTER *ioc;
17781774

17791775
/* If we can't locate our host adapter structure, return FAILED status.
@@ -1859,8 +1855,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
18591855
vdevice->vtarget->id, vdevice->lun,
18601856
ctx2abort, mptscsih_get_tm_timeout(ioc));
18611857

1862-
if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx &&
1863-
SCpnt->serial_number == sn) {
1858+
if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) {
18641859
dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
18651860
"task abort: command still in active list! (sc=%p)\n",
18661861
ioc->name, SCpnt));
@@ -1873,9 +1868,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
18731868
}
18741869

18751870
out:
1876-
printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p) (sn=%ld)\n",
1871+
printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)\n",
18771872
ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), retval,
1878-
SCpnt, SCpnt->serial_number);
1873+
SCpnt);
18791874

18801875
return retval;
18811876
}

‎drivers/message/fusion/mptspi.c‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,10 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
867867
struct _x_config_parms cfg;
868868
struct _CONFIG_PAGE_HEADER hdr;
869869
int err = -EBUSY;
870+
u32 nego_parms;
871+
u32 period;
872+
struct scsi_device *sdev;
873+
int i;
870874

871875
/* don't allow updating nego parameters on RAID devices */
872876
if (starget->channel == 0 &&
@@ -904,6 +908,24 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
904908
pg1->Header.PageNumber = hdr.PageNumber;
905909
pg1->Header.PageType = hdr.PageType;
906910

911+
nego_parms = le32_to_cpu(pg1->RequestedParameters);
912+
period = (nego_parms & MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK) >>
913+
MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD;
914+
if (period == 8) {
915+
/* Turn on inline data padding for TAPE when running U320 */
916+
for (i = 0 ; i < 16; i++) {
917+
sdev = scsi_device_lookup_by_target(starget, i);
918+
if (sdev && sdev->type == TYPE_TAPE) {
919+
sdev_printk(KERN_DEBUG, sdev, MYIOC_s_FMT
920+
"IDP:ON\n", ioc->name);
921+
nego_parms |= MPI_SCSIDEVPAGE1_RP_IDP;
922+
pg1->RequestedParameters =
923+
cpu_to_le32(nego_parms);
924+
break;
925+
}
926+
}
927+
}
928+
907929
mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters));
908930

909931
if (mpt_config(ioc, &cfg)) {

‎drivers/message/i2o/i2o_scsi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
361361
*/
362362
error = le32_to_cpu(msg->body[0]);
363363

364-
osm_debug("Completed %ld\n", cmd->serial_number);
364+
osm_debug("Completed %0x%p\n", cmd);
365365

366366
cmd->result = error & 0xff;
367367
/*
@@ -678,7 +678,7 @@ static int i2o_scsi_queuecommand_lck(struct scsi_cmnd *SCpnt,
678678
/* Queue the message */
679679
i2o_msg_post(c, msg);
680680

681-
osm_debug("Issued %ld\n", SCpnt->serial_number);
681+
osm_debug("Issued %0x%p\n", SCpnt);
682682

683683
return 0;
684684

‎drivers/scsi/arcmsr/arcmsr_hba.c‎

Lines changed: 57 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ MODULE_AUTHOR("Nick Cheng <support@areca.com.tw>");
7575
MODULE_DESCRIPTION("ARECA (ARC11xx/12xx/16xx/1880) SATA/SAS RAID Host Bus Adapter");
7676
MODULE_LICENSE("Dual BSD/GPL");
7777
MODULE_VERSION(ARCMSR_DRIVER_VERSION);
78-
static int sleeptime = 10;
79-
static int retrycount = 12;
78+
79+
#define ARCMSR_SLEEPTIME 10
80+
#define ARCMSR_RETRYCOUNT 12
81+
8082
wait_queue_head_t wait_q;
8183
static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
8284
struct scsi_cmnd *cmd);
@@ -171,24 +173,6 @@ static struct pci_driver arcmsr_pci_driver = {
171173
****************************************************************************
172174
****************************************************************************
173175
*/
174-
int arcmsr_sleep_for_bus_reset(struct scsi_cmnd *cmd)
175-
{
176-
struct Scsi_Host *shost = NULL;
177-
int i, isleep;
178-
shost = cmd->device->host;
179-
isleep = sleeptime / 10;
180-
if (isleep > 0) {
181-
for (i = 0; i < isleep; i++) {
182-
msleep(10000);
183-
}
184-
}
185-
186-
isleep = sleeptime % 10;
187-
if (isleep > 0) {
188-
msleep(isleep*1000);
189-
}
190-
return 0;
191-
}
192176

193177
static void arcmsr_free_hbb_mu(struct AdapterControlBlock *acb)
194178
{
@@ -323,66 +307,64 @@ static void arcmsr_define_adapter_type(struct AdapterControlBlock *acb)
323307

324308
default: acb->adapter_type = ACB_ADAPTER_TYPE_A;
325309
}
326-
}
310+
}
327311

328312
static uint8_t arcmsr_hba_wait_msgint_ready(struct AdapterControlBlock *acb)
329313
{
330314
struct MessageUnit_A __iomem *reg = acb->pmuA;
331-
uint32_t Index;
332-
uint8_t Retries = 0x00;
333-
do {
334-
for (Index = 0; Index < 100; Index++) {
335-
if (readl(&reg->outbound_intstatus) &
336-
ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
337-
writel(ARCMSR_MU_OUTBOUND_MESSAGE0_INT,
338-
&reg->outbound_intstatus);
339-
return true;
340-
}
341-
msleep(10);
342-
}/*max 1 seconds*/
315+
int i;
316+
317+
for (i = 0; i < 2000; i++) {
318+
if (readl(&reg->outbound_intstatus) &
319+
ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
320+
writel(ARCMSR_MU_OUTBOUND_MESSAGE0_INT,
321+
&reg->outbound_intstatus);
322+
return true;
323+
}
324+
msleep(10);
325+
} /* max 20 seconds */
343326

344-
} while (Retries++ < 20);/*max 20 sec*/
345327
return false;
346328
}
347329

348330
static uint8_t arcmsr_hbb_wait_msgint_ready(struct AdapterControlBlock *acb)
349331
{
350332
struct MessageUnit_B *reg = acb->pmuB;
351-
uint32_t Index;
352-
uint8_t Retries = 0x00;
353-
do {
354-
for (Index = 0; Index < 100; Index++) {
355-
if (readl(reg->iop2drv_doorbell)
356-
& ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
357-
writel(ARCMSR_MESSAGE_INT_CLEAR_PATTERN
358-
, reg->iop2drv_doorbell);
359-
writel(ARCMSR_DRV2IOP_END_OF_INTERRUPT, reg->drv2iop_doorbell);
360-
return true;
361-
}
362-
msleep(10);
363-
}/*max 1 seconds*/
333+
int i;
334+
335+
for (i = 0; i < 2000; i++) {
336+
if (readl(reg->iop2drv_doorbell)
337+
& ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
338+
writel(ARCMSR_MESSAGE_INT_CLEAR_PATTERN,
339+
reg->iop2drv_doorbell);
340+
writel(ARCMSR_DRV2IOP_END_OF_INTERRUPT,
341+
reg->drv2iop_doorbell);
342+
return true;
343+
}
344+
msleep(10);
345+
} /* max 20 seconds */
364346

365-
} while (Retries++ < 20);/*max 20 sec*/
366347
return false;
367348
}
368349

369350
static uint8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *pACB)
370351
{
371352
struct MessageUnit_C *phbcmu = (struct MessageUnit_C *)pACB->pmuC;
372-
unsigned char Retries = 0x00;
373-
uint32_t Index;
374-
do {
375-
for (Index = 0; Index < 100; Index++) {
376-
if (readl(&phbcmu->outbound_doorbell) & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
377-
writel(ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR, &phbcmu->outbound_doorbell_clear);/*clear interrupt*/
378-
return true;
379-
}
380-
/* one us delay */
381-
msleep(10);
382-
} /*max 1 seconds*/
383-
} while (Retries++ < 20); /*max 20 sec*/
353+
int i;
354+
355+
for (i = 0; i < 2000; i++) {
356+
if (readl(&phbcmu->outbound_doorbell)
357+
& ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
358+
writel(ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR,
359+
&phbcmu->outbound_doorbell_clear); /*clear interrupt*/
360+
return true;
361+
}
362+
msleep(10);
363+
} /* max 20 seconds */
364+
384365
return false;
385366
}
367+
386368
static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb)
387369
{
388370
struct MessageUnit_A __iomem *reg = acb->pmuA;
@@ -459,10 +441,11 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb)
459441
struct CommandControlBlock *ccb_tmp;
460442
int i = 0, j = 0;
461443
dma_addr_t cdb_phyaddr;
462-
unsigned long roundup_ccbsize = 0, offset;
444+
unsigned long roundup_ccbsize;
463445
unsigned long max_xfer_len;
464446
unsigned long max_sg_entrys;
465447
uint32_t firm_config_version;
448+
466449
for (i = 0; i < ARCMSR_MAX_TARGETID; i++)
467450
for (j = 0; j < ARCMSR_MAX_TARGETLUN; j++)
468451
acb->devstate[i][j] = ARECA_RAID_GONE;
@@ -472,23 +455,20 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb)
472455
firm_config_version = acb->firm_cfg_version;
473456
if((firm_config_version & 0xFF) >= 3){
474457
max_xfer_len = (ARCMSR_CDB_SG_PAGE_LENGTH << ((firm_config_version >> 8) & 0xFF)) * 1024;/* max 4M byte */
475-
max_sg_entrys = (max_xfer_len/4096);
458+
max_sg_entrys = (max_xfer_len/4096);
476459
}
477460
acb->host->max_sectors = max_xfer_len/512;
478461
acb->host->sg_tablesize = max_sg_entrys;
479462
roundup_ccbsize = roundup(sizeof(struct CommandControlBlock) + (max_sg_entrys - 1) * sizeof(struct SG64ENTRY), 32);
480-
acb->uncache_size = roundup_ccbsize * ARCMSR_MAX_FREECCB_NUM + 32;
463+
acb->uncache_size = roundup_ccbsize * ARCMSR_MAX_FREECCB_NUM;
481464
dma_coherent = dma_alloc_coherent(&pdev->dev, acb->uncache_size, &dma_coherent_handle, GFP_KERNEL);
482465
if(!dma_coherent){
483-
printk(KERN_NOTICE "arcmsr%d: dma_alloc_coherent got error \n", acb->host->host_no);
466+
printk(KERN_NOTICE "arcmsr%d: dma_alloc_coherent got error\n", acb->host->host_no);
484467
return -ENOMEM;
485468
}
486469
acb->dma_coherent = dma_coherent;
487470
acb->dma_coherent_handle = dma_coherent_handle;
488471
memset(dma_coherent, 0, acb->uncache_size);
489-
offset = roundup((unsigned long)dma_coherent, 32) - (unsigned long)dma_coherent;
490-
dma_coherent_handle = dma_coherent_handle + offset;
491-
dma_coherent = (struct CommandControlBlock *)dma_coherent + offset;
492472
ccb_tmp = dma_coherent;
493473
acb->vir2phy_offset = (unsigned long)dma_coherent - (unsigned long)dma_coherent_handle;
494474
for(i = 0; i < ARCMSR_MAX_FREECCB_NUM; i++){
@@ -2602,12 +2582,8 @@ static int arcmsr_iop_confirm(struct AdapterControlBlock *acb)
26022582
if (cdb_phyaddr_hi32 != 0) {
26032583
struct MessageUnit_C *reg = (struct MessageUnit_C *)acb->pmuC;
26042584

2605-
if (cdb_phyaddr_hi32 != 0) {
2606-
unsigned char Retries = 0x00;
2607-
do {
2608-
printk(KERN_NOTICE "arcmsr%d: cdb_phyaddr_hi32=0x%x \n", acb->adapter_index, cdb_phyaddr_hi32);
2609-
} while (Retries++ < 100);
2610-
}
2585+
printk(KERN_NOTICE "arcmsr%d: cdb_phyaddr_hi32=0x%x\n",
2586+
acb->adapter_index, cdb_phyaddr_hi32);
26112587
writel(ARCMSR_SIGNATURE_SET_CONFIG, &reg->msgcode_rwbuffer[0]);
26122588
writel(cdb_phyaddr_hi32, &reg->msgcode_rwbuffer[1]);
26132589
writel(ARCMSR_INBOUND_MESG0_SET_CONFIG, &reg->inbound_msgaddr0);
@@ -2955,12 +2931,12 @@ static int arcmsr_bus_reset(struct scsi_cmnd *cmd)
29552931
arcmsr_hardware_reset(acb);
29562932
acb->acb_flags &= ~ACB_F_IOP_INITED;
29572933
sleep_again:
2958-
arcmsr_sleep_for_bus_reset(cmd);
2934+
ssleep(ARCMSR_SLEEPTIME);
29592935
if ((readl(&reg->outbound_msgaddr1) & ARCMSR_OUTBOUND_MESG1_FIRMWARE_OK) == 0) {
2960-
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d \n", acb->host->host_no, retry_count);
2961-
if (retry_count > retrycount) {
2936+
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d\n", acb->host->host_no, retry_count);
2937+
if (retry_count > ARCMSR_RETRYCOUNT) {
29622938
acb->fw_flag = FW_DEADLOCK;
2963-
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!! \n", acb->host->host_no);
2939+
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!!\n", acb->host->host_no);
29642940
return FAILED;
29652941
}
29662942
retry_count++;
@@ -3025,12 +3001,12 @@ static int arcmsr_bus_reset(struct scsi_cmnd *cmd)
30253001
arcmsr_hardware_reset(acb);
30263002
acb->acb_flags &= ~ACB_F_IOP_INITED;
30273003
sleep:
3028-
arcmsr_sleep_for_bus_reset(cmd);
3004+
ssleep(ARCMSR_SLEEPTIME);
30293005
if ((readl(&reg->host_diagnostic) & 0x04) != 0) {
3030-
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d \n", acb->host->host_no, retry_count);
3031-
if (retry_count > retrycount) {
3006+
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d\n", acb->host->host_no, retry_count);
3007+
if (retry_count > ARCMSR_RETRYCOUNT) {
30323008
acb->fw_flag = FW_DEADLOCK;
3033-
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!! \n", acb->host->host_no);
3009+
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!!\n", acb->host->host_no);
30343010
return FAILED;
30353011
}
30363012
retry_count++;

‎drivers/scsi/be2iscsi/be.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (C) 2005 - 2010 ServerEngines
2+
* Copyright (C) 2005 - 2011 Emulex
33
* All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
88
* Public License is included in this distribution in the file called COPYING.
99
*
1010
* Contact Information:
11-
* linux-drivers@serverengines.com
11+
* linux-drivers@emulex.com
1212
*
13-
* ServerEngines
14-
* 209 N. Fair Oaks Ave
15-
* Sunnyvale, CA 94085
13+
* Emulex
14+
* 3333 Susan Street
15+
* Costa Mesa, CA 92626
1616
*/
1717

1818
#ifndef BEISCSI_H

0 commit comments

Comments
 (0)