Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Three small driver fixes and one core fix.

The core fix being a fixup to the one in the last pull request which
didn't entirely move checking of scsi_host_busy() out from under the
host lock"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: ufs: core: Remove the ufshcd_release() in ufshcd_err_handling_prepare()
scsi: ufs: core: Fix shift issue in ufshcd_clear_cmd()
scsi: lpfc: Use unsigned type for num_sge
scsi: core: Move scsi_host_busy() out of host lock if it is for per-command

+14 -10
+6 -6
drivers/scsi/lpfc/lpfc_scsi.c
··· 1918 1918 * 1919 1919 * Returns the number of SGEs added to the SGL. 1920 1920 **/ 1921 - static int 1921 + static uint32_t 1922 1922 lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc, 1923 1923 struct sli4_sge *sgl, int datasegcnt, 1924 1924 struct lpfc_io_buf *lpfc_cmd) ··· 1926 1926 struct scatterlist *sgde = NULL; /* s/g data entry */ 1927 1927 struct sli4_sge_diseed *diseed = NULL; 1928 1928 dma_addr_t physaddr; 1929 - int i = 0, num_sge = 0, status; 1930 - uint32_t reftag; 1929 + int i = 0, status; 1930 + uint32_t reftag, num_sge = 0; 1931 1931 uint8_t txop, rxop; 1932 1932 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS 1933 1933 uint32_t rc; ··· 2099 2099 * 2100 2100 * Returns the number of SGEs added to the SGL. 2101 2101 **/ 2102 - static int 2102 + static uint32_t 2103 2103 lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, 2104 2104 struct sli4_sge *sgl, int datacnt, int protcnt, 2105 2105 struct lpfc_io_buf *lpfc_cmd) ··· 2123 2123 uint32_t rc; 2124 2124 #endif 2125 2125 uint32_t checking = 1; 2126 - uint32_t dma_offset = 0; 2127 - int num_sge = 0, j = 2; 2126 + uint32_t dma_offset = 0, num_sge = 0; 2127 + int j = 2; 2128 2128 struct sli4_hybrid_sgl *sgl_xtra = NULL; 2129 2129 2130 2130 sgpe = scsi_prot_sglist(sc);
+2 -1
drivers/scsi/scsi_error.c
··· 282 282 { 283 283 struct scsi_cmnd *scmd = container_of(head, typeof(*scmd), rcu); 284 284 struct Scsi_Host *shost = scmd->device->host; 285 + unsigned int busy = scsi_host_busy(shost); 285 286 unsigned long flags; 286 287 287 288 spin_lock_irqsave(shost->host_lock, flags); 288 289 shost->host_failed++; 289 - scsi_eh_wakeup(shost, scsi_host_busy(shost)); 290 + scsi_eh_wakeup(shost, busy); 290 291 spin_unlock_irqrestore(shost->host_lock, flags); 291 292 } 292 293
+3 -1
drivers/scsi/scsi_lib.c
··· 278 278 rcu_read_lock(); 279 279 __clear_bit(SCMD_STATE_INFLIGHT, &cmd->state); 280 280 if (unlikely(scsi_host_in_recovery(shost))) { 281 + unsigned int busy = scsi_host_busy(shost); 282 + 281 283 spin_lock_irqsave(shost->host_lock, flags); 282 284 if (shost->host_failed || shost->host_eh_scheduled) 283 - scsi_eh_wakeup(shost, scsi_host_busy(shost)); 285 + scsi_eh_wakeup(shost, busy); 284 286 spin_unlock_irqrestore(shost->host_lock, flags); 285 287 } 286 288 rcu_read_unlock();
+3 -2
drivers/ufs/core/ufshcd.c
··· 3057 3057 */ 3058 3058 static int ufshcd_clear_cmd(struct ufs_hba *hba, u32 task_tag) 3059 3059 { 3060 - u32 mask = 1U << task_tag; 3060 + u32 mask; 3061 3061 unsigned long flags; 3062 3062 int err; 3063 3063 ··· 3074 3074 } 3075 3075 return 0; 3076 3076 } 3077 + 3078 + mask = 1U << task_tag; 3077 3079 3078 3080 /* clear outstanding transaction before retry */ 3079 3081 spin_lock_irqsave(hba->host->host_lock, flags); ··· 6354 6352 ufshcd_hold(hba); 6355 6353 if (!ufshcd_is_clkgating_allowed(hba)) 6356 6354 ufshcd_setup_clocks(hba, true); 6357 - ufshcd_release(hba); 6358 6355 pm_op = hba->is_sys_suspended ? UFS_SYSTEM_PM : UFS_RUNTIME_PM; 6359 6356 ufshcd_vops_resume(hba, pm_op); 6360 6357 } else {