SCSI fixes for 3.12-rc6
Subsystems (4)
James Bottomley
maintainerThis is a set of 2 fixes which cause oopses (Buslogic, qla2xxx), 1 fix which may cause a hang because of request miscounting (sd) and four updates to the eas2r driver which was a new driver in the last merge window and is thus eligible to have updates under the new driver rule.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Aaron Lu (1):
sd: call blk_pm_runtime_init before add_disk
Bradley Grove (4):
esas2r: Cleanup snprinf formatting of firmware version
esas2r: Remove superfluous mask of pcie_cap_reg
esas2r: Fixes for big-endian platforms
esas2r: Directly call kernel functions for atomic bit operations
Chad Dupuis (1):
qla2xxx: Fix request queue null dereference.
Khalid Aziz (1):
BusLogic: Fix an oops when intializing multimaster adapter
The diffstat is:
drivers/scsi/BusLogic.c | 16 ++-- drivers/scsi/esas2r/esas2r.h | 132 ++++++++++++++---------------- drivers/scsi/esas2r/esas2r_disc.c | 55 ++++++------- drivers/scsi/esas2r/esas2r_flash.c | 34 ++++---- drivers/scsi/esas2r/esas2r_init.c | 156 ++++++++++++++++++------------------ drivers/scsi/esas2r/esas2r_int.c | 97 +++++++++++----------- drivers/scsi/esas2r/esas2r_io.c | 73 ++++++++--------- drivers/scsi/esas2r/esas2r_ioctl.c | 28 +++---- drivers/scsi/esas2r/esas2r_main.c | 34 ++++---- drivers/scsi/esas2r/esas2r_targdb.c | 2 +- drivers/scsi/esas2r/esas2r_vda.c | 12 +-- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 9 +++ drivers/scsi/sd.c | 2 +- 14 files changed, 323 insertions(+), 329 deletions(-)
With full diff attached below.
James
---
drivers/scsi/BusLogic.c +8 -8
@@ -696,7 +696,7 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)while ((pci_device =pci_get_device (PCI_VENDOR_ID_BUSLOGIC ,PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER , pci_device)) !=NULL ) { -struct blogic_adapter *adapter = adapter; +struct blogic_adapter *host_adapter = adapter;struct blogic_adapter_info adapter_info;enum blogic_isa_ioport mod_ioaddr_req;unsigned char bus;
@@ -744,9 +744,9 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)known and enabled, note that the particular Standard ISA I/O Address should not be probed. */ - adapter->io_addr = io_addr; -blogic_intreset (adapter); -if (blogic_cmd (adapter,BLOGIC_INQ_PCI_INFO ,NULL ,0 , + host_adapter->io_addr = io_addr; +blogic_intreset (host_adapter); +if (blogic_cmd (host_adapter,BLOGIC_INQ_PCI_INFO ,NULL ,0 , &adapter_info,sizeof (adapter_info)) ==sizeof (adapter_info)) {if (adapter_info.isa_port <6 )
@@ -762,7 +762,7 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)I/O Address assigned at system initialization. */ mod_ioaddr_req =BLOGIC_IO_DISABLE ; -blogic_cmd (adapter,BLOGIC_MOD_IOADDR , &mod_ioaddr_req, +blogic_cmd (host_adapter,BLOGIC_MOD_IOADDR , &mod_ioaddr_req,sizeof (mod_ioaddr_req),NULL ,0 );/* For the first MultiMaster Host Adapter enumerated,
@@ -779,12 +779,12 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter) fetch_localram.offset =BLOGIC_AUTOSCSI_BASE +45 ; fetch_localram.count =sizeof (autoscsi_byte45); -blogic_cmd (adapter,BLOGIC_FETCH_LOCALRAM , +blogic_cmd (host_adapter,BLOGIC_FETCH_LOCALRAM , &fetch_localram,sizeof (fetch_localram), &autoscsi_byte45,sizeof (autoscsi_byte45)); -blogic_cmd (adapter,BLOGIC_GET_BOARD_ID ,NULL ,0 , &id, -sizeof (id)); +blogic_cmd (host_adapter,BLOGIC_GET_BOARD_ID ,NULL ,0 , + &id,sizeof (id));if (id.fw_ver_digit1 =='5' ) force_scan_order = autoscsi_byte45.force_scan_order;
drivers/scsi/esas2r/esas2r.h +61 -71
185 lines not on this page · raw message
drivers/scsi/esas2r/esas2r_disc.c +25 -30
161 lines not on this page · raw message
drivers/scsi/esas2r/esas2r_flash.c +19 -15
@@ -231,7 +231,7 @@ static bool load_image(struct esas2r_adapter *a, struct esas2r_request *rq)* RS_PENDING, FM API tasks will continue. */ rq->req_stat =RS_PENDING ; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))/* not suppported for now */ ;else build_flash_msg (a, rq);
@@ -315,7 +315,7 @@ static bool complete_fmapi_req(struct esas2r_adapter *a,memset (fc->scratch,0 ,FM_BUF_SZ );esas2r_enable_heartbeat (a); -esas2r_lock_clear_flags (&a->flags,AF_FLASH_LOCK ); +clear_bit (AF_FLASH_LOCK , &a->flags);return false; }
@@ -526,7 +526,7 @@ no_cfg:* The download is complete. If in degraded mode, * attempt a chip reset. */ -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))esas2r_local_reset_adapter (a); a->flash_ver = fi->cmp_hdr[CH_IT_BIOS ].version;
@@ -890,7 +890,7 @@ bool esas2r_process_fs_ioctl(struct esas2r_adapter *a, } } -if (a->flags &AF_DEGRADED_MODE ) { +if (test_bit (AF_DEGRADED_MODE , &a->flags)) { fs->status =ATTO_STS_DEGRADED ;return false; }
@@ -945,8 +945,12 @@ static bool esas2r_flash_access(struct esas2r_adapter *a, u32 function)/* Now wait for the firmware to process it */ starttime =jiffies_to_msecs (jiffies); - timeout = a->flags & - (AF_CHPRST_PENDING |AF_DISC_PENDING ) ?40000 :5000 ; + +if (test_bit (AF_CHPRST_PENDING , &a->flags) || +test_bit (AF_DISC_PENDING , &a->flags)) + timeout =40000 ; +else + timeout =5000 ;while (true) { intstat =esas2r_read_register_dword (a,MU_INT_STATUS_OUT );
@@ -1008,7 +1012,7 @@ bool esas2r_read_flash_block(struct esas2r_adapter *a,u32 offset;u32 iatvr; -if (a->flags2 &AF2_SERIAL_FLASH ) +if (test_bit (AF2_SERIAL_FLASH , &a->flags2)) iatvr =MW_DATA_ADDR_SER_FLASH + (from & -WINDOW_SIZE );else iatvr =MW_DATA_ADDR_PAR_FLASH + (from & -WINDOW_SIZE );
@@ -1236,9 +1240,9 @@ static void esas2r_nvram_callback(struct esas2r_adapter *a,if (rq->req_stat !=RS_PENDING ) {/* update the NVRAM state */ if (rq->req_stat ==RS_SUCCESS ) -esas2r_lock_set_flags (&a->flags,AF_NVR_VALID ); +set_bit (AF_NVR_VALID , &a->flags);else -esas2r_lock_clear_flags (&a->flags,AF_NVR_VALID ); +clear_bit (AF_NVR_VALID , &a->flags);esas2r_enable_heartbeat (a);
@@ -1258,7 +1262,7 @@ bool esas2r_nvram_write(struct esas2r_adapter *a, struct esas2r_request *rq,u32 *sas_address_dwords = (u32 *)&sas_address_bytes[0 ];struct atto_vda_flash_req *vrq = &rq->vrq->flash; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return false;if (down_interruptible (&a->nvram_semaphore))
@@ -1302,7 +1306,7 @@ bool esas2r_nvram_write(struct esas2r_adapter *a, struct esas2r_request *rq,FLS_OFFSET_NVR , sizeof(struct esas2r_sas_nvram)); -if (a->flags &AF_LEGACY_SGE_MODE ) { +if (test_bit (AF_LEGACY_SGE_MODE , &a->flags)) { vrq->data.sge[0 ].length = cpu_to_le32(SGE_LAST |
@@ -1337,7 +1341,7 @@ bool esas2r_nvram_validate(struct esas2r_adapter *a) }else if (n->version >SASNVR_VERSION ) {esas2r_hdebug ("invalid NVRAM version" ); }else { -esas2r_lock_set_flags (&a->flags,AF_NVR_VALID ); +set_bit (AF_NVR_VALID , &a->flags); rslt = true; }
@@ -1359,7 +1363,7 @@ void esas2r_nvram_set_defaults(struct esas2r_adapter *a)struct esas2r_sas_nvram *n = a->nvram;u32 time =jiffies_to_msecs (jiffies); -esas2r_lock_clear_flags (&a->flags,AF_NVR_VALID ); +clear_bit (AF_NVR_VALID , &a->flags); *n = default_sas_nvram; n->sas_addr[3 ] |=0x0F ; n->sas_addr[4 ] =HIBYTE (LOWORD (time));
@@ -1389,7 +1393,7 @@ bool esas2r_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi,u8 j;struct esas2r_component_header *ch; -if (esas2r_lock_set_flags (&a->flags,AF_FLASH_LOCK ) &AF_FLASH_LOCK ) { +if (test_and_set_bit (AF_FLASH_LOCK , &a->flags)) {/* flag was already set */ fi->status =FI_STAT_BUSY ;return false;
@@ -1413,7 +1417,7 @@ bool esas2r_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi,return complete_fmapi_req (a, rq,FI_STAT_IMG_VER ); } -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return complete_fmapi_req (a, rq,FI_STAT_DEGRADED );switch (fi->action) {
drivers/scsi/esas2r/esas2r_init.c +77 -79
421 lines not on this page · raw message
drivers/scsi/esas2r/esas2r_int.c +49 -48
257 lines not on this page · raw message
drivers/scsi/esas2r/esas2r_io.c +35 -38
161 lines not on this page · raw message
drivers/scsi/esas2r/esas2r_ioctl.c +14 -14
@@ -347,7 +347,7 @@ static bool csmi_ioctl_tunnel(struct esas2r_adapter *a, {struct atto_vda_ioctl_req *ioctl = &rq->vrq->ioctl; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return false;esas2r_sgc_init (sgc, a, rq, rq->vrq->ioctl.sge);
@@ -463,7 +463,7 @@ static int csmi_ioctl_callback(struct esas2r_adapter *a, gcc->bios_minor_rev =LOBYTE (HIWORD (a->flash_ver)); gcc->bios_build_rev =LOWORD (a->flash_ver); -if (a->flags2 &AF2_THUNDERLINK ) +if (test_bit (AF2_THUNDERLINK , &a->flags2)) gcc->cntlr_flags =CSMI_CNTLRF_SAS_HBA |CSMI_CNTLRF_SATA_HBA ;else
@@ -485,7 +485,7 @@ static int csmi_ioctl_callback(struct esas2r_adapter *a, {struct atto_csmi_get_cntlr_sts *gcs = &ioctl_csmi->cntlr_sts; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags)) gcs->status =CSMI_CNTLR_STS_FAILED ;else gcs->status =CSMI_CNTLR_STS_GOOD ;
@@ -819,10 +819,10 @@ static int hba_ioctl_callback(struct esas2r_adapter *a, gai->adap_type =ATTO_GAI_AT_ESASRAID2 ; -if (a->flags2 &AF2_THUNDERLINK ) +if (test_bit (AF2_THUNDERLINK , &a->flags2)) gai->adap_type =ATTO_GAI_AT_TLSASHBA ; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags)) gai->adap_flags |=ATTO_GAI_AF_DEGRADED ; gai->adap_flags |= ATTO_GAI_AF_SPT_SUPP |
@@ -938,7 +938,7 @@ static int hba_ioctl_callback(struct esas2r_adapter *a,u32 total_len =ESAS2R_FWCOREDUMP_SZ ;/* Size is zero if a core dump isn't present */ -if (!(a->flags2 &AF2_COREDUMP_SAVED )) +if (!test_bit (AF2_COREDUMP_SAVED , &a->flags2)) total_len =0 ;if (len > total_len)
@@ -960,8 +960,7 @@ static int hba_ioctl_callback(struct esas2r_adapter *a,memset (a->fw_coredump_buff,0 ,ESAS2R_FWCOREDUMP_SZ ); -esas2r_lock_clear_flags (&a->flags2, -AF2_COREDUMP_SAVED ); +clear_bit (AF2_COREDUMP_SAVED , &a->flags2); }else if (trc->trace_func !=ATTO_TRC_TF_GET_INFO ) { hi->status =ATTO_STS_UNSUPPORTED ;break ;
@@ -973,7 +972,7 @@ static int hba_ioctl_callback(struct esas2r_adapter *a, trc->total_length =ESAS2R_FWCOREDUMP_SZ ;/* Return zero length buffer if core dump not present */ -if (!(a->flags2 &AF2_COREDUMP_SAVED )) +if (!test_bit (AF2_COREDUMP_SAVED , &a->flags2)) trc->total_length =0 ; }else { hi->status =ATTO_STS_UNSUPPORTED ;
@@ -1048,6 +1047,7 @@ static int hba_ioctl_callback(struct esas2r_adapter *a,else if (spt->flags &ATTO_SPTF_HEAD_OF_Q ) rq->vrq->scsi.flags |=cpu_to_le32 (FCP_CMND_TA_HEAD_Q ); +if (!esas2r_build_sg_list (a, rq, sgc)) { hi->status =ATTO_STS_OUT_OF_RSRC ;break ;
@@ -1139,15 +1139,15 @@ static int hba_ioctl_callback(struct esas2r_adapter *a,break ; } -if (a->flags &AF_CHPRST_NEEDED ) +if (test_bit (AF_CHPRST_NEEDED , &a->flags)) ac->adap_state =ATTO_AC_AS_RST_SCHED ; -else if (a->flags &AF_CHPRST_PENDING ) +else if (test_bit (AF_CHPRST_PENDING , &a->flags)) ac->adap_state =ATTO_AC_AS_RST_IN_PROG ; -else if (a->flags &AF_DISC_PENDING ) +else if (test_bit (AF_DISC_PENDING , &a->flags)) ac->adap_state =ATTO_AC_AS_RST_DISC ; -else if (a->flags &AF_DISABLED ) +else if (test_bit (AF_DISABLED , &a->flags)) ac->adap_state =ATTO_AC_AS_DISABLED ; -else if (a->flags &AF_DEGRADED_MODE ) +else if (test_bit (AF_DEGRADED_MODE , &a->flags)) ac->adap_state =ATTO_AC_AS_DEGRADED ;else ac->adap_state =ATTO_AC_AS_OK ;
drivers/scsi/esas2r/esas2r_main.c +17 -17
@@ -889,7 +889,7 @@ int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)/* Assume success, if it fails we will fix the result later. */ cmd->result =DID_OK <<16 ; -if (unlikely (a->flags &AF_DEGRADED_MODE )) { +if (unlikely (test_bit (AF_DEGRADED_MODE , &a->flags))) { cmd->result =DID_NO_CONNECT <<16 ; cmd->scsi_done (cmd);return 0 ;
@@ -1050,7 +1050,7 @@ int esas2r_eh_abort(struct scsi_cmnd *cmd)esas2r_log (ESAS2R_LOG_INFO ,"eh_abort (%p)" , cmd); -if (a->flags &AF_DEGRADED_MODE ) { +if (test_bit (AF_DEGRADED_MODE , &a->flags)) { cmd->result =DID_ABORT <<16 ;scsi_set_resid (cmd,0 );
@@ -1131,7 +1131,7 @@ static int esas2r_host_bus_reset(struct scsi_cmnd *cmd, bool host_reset)struct esas2r_adapter *a = (struct esas2r_adapter *)cmd->device->host->hostdata; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return FAILED ;if (host_reset)
@@ -1141,14 +1141,14 @@ static int esas2r_host_bus_reset(struct scsi_cmnd *cmd, bool host_reset)/* above call sets the AF_OS_RESET flag. wait for it to clear. */ -while (a->flags &AF_OS_RESET ) { +while (test_bit (AF_OS_RESET , &a->flags)) {msleep (10 ); -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return FAILED ; } -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return FAILED ;return SUCCESS ;
@@ -1176,7 +1176,7 @@ static int esas2r_dev_targ_reset(struct scsi_cmnd *cmd, bool target_reset)u8 task_management_status =RS_PENDING ;bool completed; -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return FAILED ; retry:
@@ -1229,7 +1229,7 @@ retry:msleep (10 ); } -if (a->flags &AF_DEGRADED_MODE ) +if (test_bit (AF_DEGRADED_MODE , &a->flags))return FAILED ;if (task_management_status ==RS_BUSY ) {
@@ -1666,13 +1666,13 @@ void esas2r_adapter_tasklet(unsigned long context) {struct esas2r_adapter *a = (struct esas2r_adapter *)context; -if (unlikely (a->flags2 &AF2_TIMER_TICK )) { -esas2r_lock_clear_flags (&a->flags2,AF2_TIMER_TICK ); +if (unlikely (test_bit (AF2_TIMER_TICK , &a->flags2))) { +clear_bit (AF2_TIMER_TICK , &a->flags2);esas2r_timer_tick (a); } -if (likely (a->flags2 &AF2_INT_PENDING )) { -esas2r_lock_clear_flags (&a->flags2,AF2_INT_PENDING ); +if (likely (test_bit (AF2_INT_PENDING , &a->flags2))) { +clear_bit (AF2_INT_PENDING , &a->flags2);esas2r_adapter_interrupt (a); }
@@ -1680,12 +1680,12 @@ void esas2r_adapter_tasklet(unsigned long context)esas2r_do_tasklet_tasks (a);if (esas2r_is_tasklet_pending (a) - || (a->flags2 &AF2_INT_PENDING ) - || (a->flags2 &AF2_TIMER_TICK )) { -esas2r_lock_clear_flags (&a->flags,AF_TASKLET_SCHEDULED ); + || (test_bit (AF2_INT_PENDING , &a->flags2)) + || (test_bit (AF2_TIMER_TICK , &a->flags2))) { +clear_bit (AF_TASKLET_SCHEDULED , &a->flags);esas2r_schedule_tasklet (a); }else { -esas2r_lock_clear_flags (&a->flags,AF_TASKLET_SCHEDULED ); +clear_bit (AF_TASKLET_SCHEDULED , &a->flags); } }
@@ -1707,7 +1707,7 @@ static void esas2r_timer_callback(unsigned long context) {struct esas2r_adapter *a = (struct esas2r_adapter *)context; -esas2r_lock_set_flags (&a->flags2,AF2_TIMER_TICK ); +set_bit (AF2_TIMER_TICK , &a->flags2);esas2r_schedule_tasklet (a);
drivers/scsi/esas2r/esas2r_targdb.c +1 -1
@@ -86,7 +86,7 @@ void esas2r_targ_db_report_changes(struct esas2r_adapter *a)esas2r_trace_enter (); -if (a->flags &AF_DISC_PENDING ) { +if (test_bit (AF_DISC_PENDING , &a->flags)) {esas2r_trace_exit ();return ; }
drivers/scsi/esas2r/esas2r_vda.c +6 -6
@@ -84,7 +84,7 @@ bool esas2r_process_vda_ioctl(struct esas2r_adapter *a,return false; } -if (a->flags &AF_DEGRADED_MODE ) { +if (test_bit (AF_DEGRADED_MODE , &a->flags)) { vi->status =ATTO_STS_DEGRADED ;return false; }
@@ -310,9 +310,9 @@ static void esas2r_complete_vda_ioctl(struct esas2r_adapter *a,le32_to_cpu (rsp->vda_version); cfg->data.init.fw_build = rsp->fw_build; -snprintf (buf,sizeof (buf),"%1d.%02d" , - (int )LOBYTE (le16_to_cpu (rsp->fw_release)), - (int )HIBYTE (le16_to_cpu (rsp->fw_release))); +snprintf (buf,sizeof (buf),"%1.1u.%2.2u" , + (int )LOBYTE (le16_to_cpu (rsp->fw_release)), + (int )HIBYTE (le16_to_cpu (rsp->fw_release)));memcpy (&cfg->data.init.fw_release, buf,sizeof (cfg->data.init.fw_release));
@@ -389,7 +389,7 @@ void esas2r_build_mgt_req(struct esas2r_adapter *a, vrq->length =cpu_to_le32 (length);if (vrq->length) { -if (a->flags &AF_LEGACY_SGE_MODE ) { +if (test_bit (AF_LEGACY_SGE_MODE , &a->flags)) { vrq->sg_list_offset = (u8 )offsetof(struct atto_vda_mgmt_req , sge);
@@ -427,7 +427,7 @@ void esas2r_build_ae_req(struct esas2r_adapter *a, struct esas2r_request *rq) vrq->length =cpu_to_le32 (sizeof (struct atto_vda_ae_data )); -if (a->flags &AF_LEGACY_SGE_MODE ) { +if (test_bit (AF_LEGACY_SGE_MODE , &a->flags)) { vrq->sg_list_offset = (u8 )offsetof(struct atto_vda_ae_req , sge); vrq->sge[0 ].length =cpu_to_le32 (SGE_LAST | vrq->length);
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
@@ -20,7 +20,7 @@* | Device Discovery | 0x2095 | 0x2020-0x2022, | * | | | 0x2011-0x2012, | * | | | 0x2016 | -* | Queue Command and IO tracing | 0x3058 | 0x3006-0x300b | +* | Queue Command and IO tracing | 0x3059 | 0x3006-0x300b | * | | | 0x3027-0x3028 | * | | | 0x303d-0x3041 | * | | | 0x302d,0x3033 |
drivers/scsi/qla2xxx/qla_isr.c +9 -0
@@ -1957,6 +1957,15 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) que =MSW (sts->handle); req = ha->req_q_map[que]; +/* Check for invalid queue pointer */ +if (req ==NULL || + que >=find_first_zero_bit (ha->req_qid_map, ha->max_req_queues)) { +ql_dbg (ql_dbg_io, vha,0x3059 , +"Invalid status handle (0x%x): Bad req pointer. req=%p, " +"que=%u.\n" , sts->handle, req, que); +return ; + } +/* Validate handle. */ if (handle < req->num_outstanding_cmds) sp = req->outstanding_cmds[handle];
drivers/scsi/sd.c +1 -1
@@ -2854,6 +2854,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) gd->events |=DISK_EVENT_MEDIA_CHANGE ; } +blk_pm_runtime_init (sdp->request_queue, dev);add_disk (gd);if (sdkp->capacity)sd_dif_config_host (sdkp);
@@ -2862,7 +2863,6 @@ static void sd_probe_async(void *data, async_cookie_t cookie)sd_printk (KERN_NOTICE , sdkp,"Attached SCSI %sdisk\n" , sdp->removable ?"removable " :"" ); -blk_pm_runtime_init (sdp->request_queue, dev);scsi_autopm_put_device (sdp);put_device (&sdkp->dev); }
Quoted 4 lines · James Bottomley
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
No it's not. "Already up-to-date.".
Also, even if it was, I'm not feeling the reason to pull it. "Cleanup sprintf formatting of firmware version"? "Remove superfluous mask of pcie_cap_reg"? Seriously?
Multi-hundred-line pull requests that come in this late had better look a bit more serious than that.
There's *HUNDREDS* of lines of changes, all of which seems to come from the change to use the (admittedly much superior) native bit handling fucntions, instead of the shit-for-brains abortion that is "esas2r_lock_set/clear_flags()"
And I see why you'd want to get rid of that horrible crap, but I see absolutely _zero_ reason to do it in -rc7.
As far as I can tell from the patch, a few lines are for actual problems like oopses. And the rest is pure and utter garbage that should have happened during the merge window.
So I literally *cannot* pull this, because the git tree doesn't contain what you said it contains. But even if it did, I would not *want* to pull this kind of completely brainless crap.
You need to curse at the people who send you this kind of crap. Seriously. This is not acceptablee timing.
Linus
James Bottomley
maintainerQuoted 8 lines · Linus Torvalds
Quoted 4 lines · James Bottomley
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixesNo it's not. "Already up-to-date.".
Um, sorry, forgot to make a tag. Done now.
Quoted 3 lines
Also, even if it was, I'm not feeling the reason to pull it. "Cleanup sprintf formatting of firmware version"? "Remove superfluous mask of
pcie_cap_reg"? Seriously?
Well, yes, provided the new driver exception still holds. The eas2r driver was added in the last merge window so it qualifies. Previously you'd said that drivers that weren't previously in the tree could have changes and cleanups added even at the -rc stage ... if you're reversing this, I can pull the eas2r updates into the misc tree insead.
Quoted 15 lines
Multi-hundred-line pull requests that come in this late had better look a bit more serious than that.
There's *HUNDREDS* of lines of changes, all of which seems to come from the change to use the (admittedly much superior) native bit handling fucntions, instead of the shit-for-brains abortion that is "esas2r_lock_set/clear_flags()"
And I see why you'd want to get rid of that horrible crap, but I see absolutely _zero_ reason to do it in -rc7.
As far as I can tell from the patch, a few lines are for actual problems like oopses. And the rest is pure and utter garbage that should have happened during the merge window.
Quoted 6 lines
So I literally *cannot* pull this, because the git tree doesn't contain what you said it contains. But even if it did, I would not *want* to pull this kind of completely brainless crap.
You need to curse at the people who send you this kind of crap. Seriously. This is not acceptablee timing.
OK, so is the new driver exception gone then?
James
Quoted 2 lines · James Bottomley
OK, so is the new driver exception gone then?
The new driver exception was about supporting new hardware, so we can add things like new ID's etc (or even whole new drivers) later in the development process than the merge window.
And any "new code" (that is behind a new config option or totally new system call or something like that, so that the code cannot be triggered by old users) can admittedly get changes more easily if it cannot regress (since it didn't exist before). But that's more a "I'll let it slide for rc2-3" thing than any big concept, and it's definitely not about rc7.
And neither of those issues have ever made it acceptable to random pointless churn. If it doesn't add support for new hardware, it's not under some kind of "new hardware support" exception. And just "it's new code, so we cannot possibly regress" is an excuse for making slightly more invasive changes (especially to ABI's etc that need to get fixed before a release), but it's not some blanket "we can do anything" exception.
And quite frankly, even the "new driver" exception was about hardware that normal people actually are expected to use. Things that are relevant for a possibly large number of users. If it's something that random people can be expected to pick up and use in Fry's or Office Depot, we want to make sure we have a driver available as soon as humanly possible.
In contrast, if it's a driver for some enterprise hardware that is only used by people who are going to run enterprise kernels anyway (ie often several years down the line), there is ABSOLUTELY NO REASON to merge it late in the release window. The enterprise users aren't using bleeding edge kernels anyway, their time constraints are different.
So if people thought it was some carte blanche for "anything goes", people were confused.
You need to think about *WHY* we had a "new driver" exception. And realize that it probably will never actually be relevant for any SCSI driver (not counting things like USB storage etc).
Linus
James Bottomley
maintainerQuoted 3 lines · Linus Torvalds
You need to think about *WHY* we had a "new driver" exception. And realize that it probably will never actually be relevant for any SCSI driver (not counting things like USB storage etc).
OK, point taken, here's the new pull request
----
This is a set of 2 fixes which cause oopses (Buslogic, qla2xxx) and 1 fix which may cause a hang because of request miscounting (sd).
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Aaron Lu (1):
sd: call blk_pm_runtime_init before add_disk
Chad Dupuis (1):
qla2xxx: Fix request queue null dereference.
Khalid Aziz (1):
BusLogic: Fix an oops when intializing multimaster adapter
And the diffstat:
drivers/scsi/BusLogic.c | 16 ++++++++-------- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 9 +++++++++ drivers/scsi/sd.c | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-)
With full diff below.
James
---
drivers/scsi/BusLogic.c +8 -8
@@ -696,7 +696,7 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)while ((pci_device =pci_get_device (PCI_VENDOR_ID_BUSLOGIC ,PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER , pci_device)) !=NULL ) { -struct blogic_adapter *adapter = adapter; +struct blogic_adapter *host_adapter = adapter;struct blogic_adapter_info adapter_info;enum blogic_isa_ioport mod_ioaddr_req;unsigned char bus;
@@ -744,9 +744,9 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)known and enabled, note that the particular Standard ISA I/O Address should not be probed. */ - adapter->io_addr = io_addr; -blogic_intreset (adapter); -if (blogic_cmd (adapter,BLOGIC_INQ_PCI_INFO ,NULL ,0 , + host_adapter->io_addr = io_addr; +blogic_intreset (host_adapter); +if (blogic_cmd (host_adapter,BLOGIC_INQ_PCI_INFO ,NULL ,0 , &adapter_info,sizeof (adapter_info)) ==sizeof (adapter_info)) {if (adapter_info.isa_port <6 )
@@ -762,7 +762,7 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)I/O Address assigned at system initialization. */ mod_ioaddr_req =BLOGIC_IO_DISABLE ; -blogic_cmd (adapter,BLOGIC_MOD_IOADDR , &mod_ioaddr_req, +blogic_cmd (host_adapter,BLOGIC_MOD_IOADDR , &mod_ioaddr_req,sizeof (mod_ioaddr_req),NULL ,0 );/* For the first MultiMaster Host Adapter enumerated,
@@ -779,12 +779,12 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter) fetch_localram.offset =BLOGIC_AUTOSCSI_BASE +45 ; fetch_localram.count =sizeof (autoscsi_byte45); -blogic_cmd (adapter,BLOGIC_FETCH_LOCALRAM , +blogic_cmd (host_adapter,BLOGIC_FETCH_LOCALRAM , &fetch_localram,sizeof (fetch_localram), &autoscsi_byte45,sizeof (autoscsi_byte45)); -blogic_cmd (adapter,BLOGIC_GET_BOARD_ID ,NULL ,0 , &id, -sizeof (id)); +blogic_cmd (host_adapter,BLOGIC_GET_BOARD_ID ,NULL ,0 , + &id,sizeof (id));if (id.fw_ver_digit1 =='5' ) force_scan_order = autoscsi_byte45.force_scan_order;
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
@@ -20,7 +20,7 @@* | Device Discovery | 0x2095 | 0x2020-0x2022, | * | | | 0x2011-0x2012, | * | | | 0x2016 | -* | Queue Command and IO tracing | 0x3058 | 0x3006-0x300b | +* | Queue Command and IO tracing | 0x3059 | 0x3006-0x300b | * | | | 0x3027-0x3028 | * | | | 0x303d-0x3041 | * | | | 0x302d,0x3033 |
drivers/scsi/qla2xxx/qla_isr.c +9 -0
@@ -1957,6 +1957,15 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) que =MSW (sts->handle); req = ha->req_q_map[que]; +/* Check for invalid queue pointer */ +if (req ==NULL || + que >=find_first_zero_bit (ha->req_qid_map, ha->max_req_queues)) { +ql_dbg (ql_dbg_io, vha,0x3059 , +"Invalid status handle (0x%x): Bad req pointer. req=%p, " +"que=%u.\n" , sts->handle, req, que); +return ; + } +/* Validate handle. */ if (handle < req->num_outstanding_cmds) sp = req->outstanding_cmds[handle];
drivers/scsi/sd.c +1 -1
@@ -2854,6 +2854,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) gd->events |=DISK_EVENT_MEDIA_CHANGE ; } +blk_pm_runtime_init (sdp->request_queue, dev);add_disk (gd);if (sdkp->capacity)sd_dif_config_host (sdkp);
@@ -2862,7 +2863,6 @@ static void sd_probe_async(void *data, async_cookie_t cookie)sd_printk (KERN_NOTICE , sdkp,"Attached SCSI %sdisk\n" , sdp->removable ?"removable " :"" ); -blk_pm_runtime_init (sdp->request_queue, dev);scsi_autopm_put_device (sdp);put_device (&sdkp->dev); }