History log of /linux-master/drivers/scsi/3w-9xxx.h
Revision Date Author Comments
# 05f7f1b9 27-Apr-2021 Samuel Holland <samuel@sholland.org>

scsi: 3w-9xxx: Fix endianness issues in command packets

The controller expects all data it sends/receives to be little-endian.
Therefore, the packet struct definitions should use the __le16/32/64
types. Once those are correct, sparse reports several issues with the
driver code, which are fixed here as well.

The main issue observed was at the call to scsi_set_resid(), where the
byteswapped parameter would eventually trigger the alignment check at
drivers/scsi/sd.c:2009. At that point, the kernel would continuously
complain about an "Unaligned partial completion", and no further I/O could
occur.

This gets the controller working on big endian powerpc64.

Link: https://lore.kernel.org/r/20210427235915.39211-4-samuel@sholland.org
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# d133b441 27-Apr-2021 Samuel Holland <samuel@sholland.org>

scsi: 3w-9xxx: Reduce scope of structure packing

Currently, all command packet structs used by this driver are packed.
However, only one (TW_SG_Entry) actually needs to be packed, because it
uses 64-bit addresses at 32-bit alignment. To improve the quality of
generated code, stop packing all of the other command packet structs. This
requires adjusting the type of one misaligned "reserved" member.

After this change, pahole reports that only one type had its layout change:
the tw_compat_info member of TW_Device_Extension is now naturally aligned.

Link: https://lore.kernel.org/r/20210427235915.39211-3-samuel@sholland.org
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 44c5027b 27-Apr-2021 Samuel Holland <samuel@sholland.org>

scsi: 3w-9xxx: Use flexible array members to avoid struct padding

In preparation for removing the "#pragma pack(1)" from the driver, fix all
instances where a trailing array member could be replaced by a flexible
array member. Since a flexible array member has zero size, it introduces no
padding, whether or not the struct is packed.

Link: https://lore.kernel.org/r/20210427235915.39211-2-samuel@sholland.org
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 1b3babe2 16-Apr-2021 Colin Ian King <colin.king@canonical.com>

scsi: 3w-9xxx: Move * operator to clean up code style warning

Checkpatch is warning that char* text sould be char *text to match the
coding style. Fix this.

Link: https://lore.kernel.org/r/20210416094713.2033212-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# bf4eebbf 13-Jan-2021 Hannes Reinecke <hare@suse.de>

scsi: 3w-9xxx: Whitespace cleanup

Link: https://lore.kernel.org/r/20210113090500.129644-4-hare@suse.de
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 07ffd4ce 10-Nov-2017 Arnd Bergmann <arnd@arndb.de>

scsi: 3w-9xxx: rework lock timeouts

The TW_IOCTL_GET_LOCK ioctl uses do_gettimeofday() to check whether a
lock has expired. This can misbehave due to a concurrent settimeofday()
call, as it is based on 'real' time, and it will overflow in y2038 on
32-bit architectures, producing unexpected results when used across the
overflow time.

This changes it to using monotonic time, using ktime_get() to simplify
the code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 2c9bce5b 09-Dec-2016 Adam Radford <aradford@gmail.com>

scsi: Update 3ware driver email addresses

This change updates the 3ware drivers (3w-xxxx, 3w-9xxx, 3w-sas) email
addresses from linuxraid@lsi.com to aradford@gmail.com, since the old
email address doesn't exist.

This patch was updated to remove www.lsi.com text.

[mkp: applied by hand]

Signed-off-by: Adam Radford <aradford@gmail.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 118c855b 23-Apr-2015 Christoph Hellwig <hch@lst.de>

3w-9xxx: fix command completion race

The 3w-9xxx driver needs to tear down the dma mappings before returning
the command to the midlayer, as there is no guarantee the sglist and
count are valid after that point. Also remove the dma mapping helpers
which have another inherent race due to the request_id index.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# 4deedd84 08-Mar-2010 Adam Radford <aradford@gmail.com>

[SCSI] 3w-xxxx, 3w-9xxx: force 60 second timeout

This small patch forces 60 second timeouts for the older 3w-xxxx &
3w-9xxx drivers for systems that don't contain the udev rule for
setting scsi timeouts to 60 seconds.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 7a252fe7 09-Mar-2009 Adam Radford <aradford@gmail.com>

[SCSI] 3w-9xxx: add power management support

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 3dabec71 22-Jul-2008 Adam Radford <aradford@gmail.com>

[SCSI] 3w-9xxx: add MSI support and misc fixes

This patch for the 3w-9xxx scsi driver applies on top of the
BKL-pushdown changes in -git9.

This patch does the following:

- 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().

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 0e78d158 20-Jul-2007 Adam Radford <aradford@gmail.com>

[SCSI] 3w-9xxx: add support for 9690SA

The attached patch updates the 3ware 9000 driver:

- Fix dma mask setting to fallback to 32-bit if 64-bit fails.
- Add support for 9690SA controllers.

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 4039c30e 26-Oct-2006 Adam Radford <aradford@gmail.com>

[SCSI] 3ware 9000 add support for 9650SE

Updates the 3ware 9000 driver:

- Free irq handler in __twa_shutdown().
- Serialize reset code.
- Add support for 9650SE controllers.

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 75913d9b 15-Mar-2006 Adam Radford <aradford@gmail.com>

[SCSI] 3ware 9000 add big endian support

The attached patch updates the 3ware 9000 driver:

- Fix 9550SX pchip reset timeout.
- Add big endian support.

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# a12e25bd 11-Jan-2006 Jes Sorensen <jes@trained-monkey.org>

[SCSI] sem2mutex 3w-[x9]xxx

Convert a the 3w-9xxx.c and 3w-xxxx.c drivers to use mutexes instead
of semaphores. Untested, but compiles and looks obviously correct.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 49bfd8db 21-Sep-2005 Adam Radford <aradford@gmail.com>

[SCSI] 3ware 9000: Add support for 9550SX controllers

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!