1. 20 Nov, 2019 30 commits
  2. 19 Nov, 2019 4 commits
  3. 13 Nov, 2019 6 commits
    • Finn Thain's avatar
      scsi: core: Clean up SG_NONE · 35c33633
      Finn Thain authored
      Remove SG_NONE and a related misleading comment. Update documentation.
      
      This patch does not affect behaviour as zero initialization is redundant.
      
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Viresh Kumar <vireshk@kernel.org>
      Cc: Oliver Neukum <oneukum@suse.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: usb-storage@lists.one-eyed-alien.net
      Link: https://lore.kernel.org/r/b4779b7a6563f6bd8d259ee457871c1c463c420e.1572656814.git.fthain@telegraphics.com.auSigned-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      35c33633
    • Finn Thain's avatar
      scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE · 79172ab2
      Finn Thain authored
      Since the scsi subsystem adopted the blk-mq API, a host with zero
      sg_tablesize crashes with a NULL pointer dereference.
      
      blk_queue_max_segments: set to minimum 1
      scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
      scsi target0:0:0: Beginning Domain Validation
      scsi target0:0:0: Domain Validation skipping write tests
      scsi target0:0:0: Ending Domain Validation
      blk_queue_max_segments: set to minimum 1
      scsi 0:0:1:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
      scsi target0:0:1: Beginning Domain Validation
      scsi target0:0:1: Domain Validation skipping write tests
      scsi target0:0:1: Ending Domain Validation
      blk_queue_max_segments: set to minimum 1
      scsi 0:0:2:0: CD-ROM            QEMU     QEMU CD-ROM      2.5+ PQ: 0 ANSI: 5
      scsi target0:0:2: Beginning Domain Validation
      scsi target0:0:2: Domain Validation skipping write tests
      scsi target0:0:2: Ending Domain Validation
      blk_queue_max_segments: set to minimum 1
      blk_queue_max_segments: set to minimum 1
      blk_queue_max_segments: set to minimum 1
      blk_queue_max_segments: set to minimum 1
      sr 0:0:2:0: Power-on or device reset occurred
      sd 0:0:0:0: Power-on or device reset occurred
      sd 0:0:1:0: Power-on or device reset occurred
      sd 0:0:0:0: [sda] 10485762 512-byte logical blocks: (5.37 GB/5.00 GiB)
      sd 0:0:0:0: [sda] Write Protect is off
      sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
      Unable to handle kernel NULL pointer dereference at virtual address (ptrval)
      Oops: 00000000
      Modules linked in:
      PC: [<001cd874>] blk_mq_free_request+0x66/0xe2
      SR: 2004  SP: (ptrval)  a2: 00874520
      d0: 00000000    d1: 00000000    d2: 009ba800    d3: 00000000
      d4: 00000000    d5: 08000002    a0: 0087be68    a1: 009a81e0
      Process kworker/u2:2 (pid: 15, task=(ptrval))
      Frame format=7 eff addr=0000007a ssw=0505 faddr=0000007a
      wb 1 stat/addr/data: 0000 00000000 00000000
      wb 2 stat/addr/data: 0000 00000000 00000000
      wb 3 stat/addr/data: 0000 0000007a 00000000
      push data: 00000000 00000000 00000000 00000000
      Stack from 0087bd98:
              00000002 00000000 0087be72 009a7820 0087bdb4 001c4f6c 009a7820 0087bdd4
              0024d200 009a7820 0024d0dc 0087be72 009baa00 0087be68 009a5000 0087be7c
              00265d10 009a5000 0087be72 00000003 00000000 00000000 00000000 0087be68
              00000bb8 00000005 00000000 00000000 00000000 00000000 00265c56 00000000
              009ba60c 0036ddf4 00000002 ffffffff 009baa00 009ba600 009a50d6 0087be74
              00227ba0 009baa08 00000001 009baa08 009ba60c 0036ddf4 00000000 00000000
      Call Trace: [<001c4f6c>] blk_put_request+0xe/0x14
       [<0024d200>] __scsi_execute+0x124/0x174
       [<0024d0dc>] __scsi_execute+0x0/0x174
       [<00265d10>] sd_revalidate_disk+0xba/0x1f02
       [<00265c56>] sd_revalidate_disk+0x0/0x1f02
       [<0036ddf4>] strlen+0x0/0x22
       [<00227ba0>] device_add+0x3da/0x604
       [<0036ddf4>] strlen+0x0/0x22
       [<00267e64>] sd_probe+0x30c/0x4b4
       [<0002da44>] process_one_work+0x0/0x402
       [<0022b978>] really_probe+0x226/0x354
       [<0022bc34>] driver_probe_device+0xa4/0xf0
       [<0002da44>] process_one_work+0x0/0x402
       [<0022bcd0>] __driver_attach_async_helper+0x50/0x70
       [<00035dae>] async_run_entry_fn+0x36/0x130
       [<0002db88>] process_one_work+0x144/0x402
       [<0002e1aa>] worker_thread+0x0/0x570
       [<0002e29a>] worker_thread+0xf0/0x570
       [<0002e1aa>] worker_thread+0x0/0x570
       [<003768d8>] schedule+0x0/0xb8
       [<0003f58c>] __init_waitqueue_head+0x0/0x12
       [<00033e92>] kthread+0xc2/0xf6
       [<000331e8>] kthread_parkme+0x0/0x4e
       [<003768d8>] schedule+0x0/0xb8
       [<00033dd0>] kthread+0x0/0xf6
       [<00002c10>] ret_from_kernel_thread+0xc/0x14
      Code: 0280 0006 0800 56c0 4400 0280 0000 00ff <52b4> 0c3a 082b 0006 0013 6706 2042 53a8 00c4 4ab9 0047 3374 6640 202d 000c 670c
      Disabling lock debugging due to kernel taint
      
      Avoid this by setting sg_tablesize = 1.
      
      Link: https://lore.kernel.org/r/4567bcae94523b47d6f3b77450ba305823bca479.1572656814.git.fthain@telegraphics.com.auReported-and-tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
      Reviewed-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
      References: commit 68ab2d76 ("scsi: cxlflash: Set sg_tablesize to 1 instead of SG_NONE")
      Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      79172ab2
    • Johan Hovold's avatar
      scsi: nsp_cs: enable compile-testing on 64-bit · d04adaa4
      Johan Hovold authored
      For some reason this driver depends on !64BIT, but it can still be useful
      to allow compile-testing on 64-bit machines.
      
      Link: https://lore.kernel.org/r/20191105085609.2338-3-johan@kernel.orgSigned-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      d04adaa4
    • Johan Hovold's avatar
      scsi: nsp_cs: drop redundant MODULE_LICENSE ifdef · 63cb70a1
      Johan Hovold authored
      The MODULE_LICENSE macro is unconditionally defined in module.h, no need to
      ifdef its use.
      
      Link: https://lore.kernel.org/r/20191105085609.2338-2-johan@kernel.orgSigned-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      63cb70a1
    • YueHaibing's avatar
      scsi: ufs: ufshcd: Remove dev_err() on platform_get_irq() failure · 70e8d9ac
      YueHaibing authored
      platform_get_irq() will call dev_err() itself on failure, so there is no
      need for the driver to also do this.  This is detected by coccinelle.
      
      Link: https://lore.kernel.org/r/20191101140058.23212-1-yuehaibing@huawei.comSigned-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      70e8d9ac
    • Kars de Jong's avatar
      scsi: zorro_esp: Limit DMA transfers to 65536 bytes (except on Fastlane) · 02f7e9f3
      Kars de Jong authored
      When using this driver on a Blizzard 1260, there were failures whenever DMA
      transfers from the SCSI bus to memory of 65535 bytes were followed by a DMA
      transfer of 1 byte. This caused the byte at offset 65535 to be overwritten
      with 0xff. The Blizzard hardware can't handle single byte DMA transfers.
      
      Besides this issue, limiting the DMA length to something that is not a
      multiple of the page size is very inefficient on most file systems.
      
      It seems this limit was chosen because the DMA transfer counter of the ESP
      by default is 16 bits wide, thus limiting the length to 65535 bytes.
      However, the value 0 means 65536 bytes, which is handled by the ESP and the
      Blizzard just fine. It is also the default maximum used by esp_scsi when
      drivers don't provide their own dma_length_limit() function.
      
      The limit of 65536 bytes can be used by all boards except the Fastlane. The
      old driver used a limit of 65532 bytes (0xfffc), which is reintroduced in
      this patch.
      
      Fixes: b7ded0e8 ("scsi: zorro_esp: Limit DMA transfers to 65535 bytes")
      Link: https://lore.kernel.org/r/20191112175523.23145-1-jongk@linux-m68k.orgSigned-off-by: default avatarKars de Jong <jongk@linux-m68k.org>
      Reviewed-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      02f7e9f3