History log of /linux-master/drivers/scsi/aic7xxx/aic7xxx_pci.c
Revision Date Author Comments
# 37a9bd70 22-Mar-2022 Tom Rix <trix@redhat.com>

scsi: aic7xxx: Use standard PCI subsystem, subdevice defines

Common defines should be used over custom defines.

Change and remove these defines:

- PCIR_SUBVEND_0 to PCI_SUBSYSTEM_VENDOR_ID

- PCIR_SUBDEV_0 to PCI_SUBSYSTEM_ID

Link: https://lore.kernel.org/r/20220322144648.2467777-1-trix@redhat.com
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 6897b9a1 02-Nov-2020 Vaibhav Gupta <vaibhavgupta40@gmail.com>

scsi: aic7xxx: Use generic power management

Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.

Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend & .resume bindings.

Link: https://lore.kernel.org/r/20201102164730.324035-7-vaibhavgupta40@gmail.com
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# cca6cb8a 29-Aug-2018 Sam Protsenko <semen.protsenko@linaro.org>

scsi: aic7xxx: Fix build using bare-metal toolchain

Bare-metal toolchains don't define __linux__, so aic7xxx build with
bare-metal toolchain is broken. This driver codebase used to be partially
shared with FreeBSD, but these days there is no point in keeping the
compatibility around. So let's just drop FreeBSD related code and get rid
of __linux__ checking in order to fix the build using bare-metal
toolchains.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 7ecaeaff 08-Apr-2017 Colin Ian King <colin.king@canonical.com>

scsi: aic7xxx: fix order of arguments in function prototype

The vendor/device and subvendor/subdevice arguments to the function
prototype ahc_9005_subdevinfo_valid are in the wrong order and need to
be swapped to fix this. Detected with PVS-Studio studio.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 6f8f8e4d 04-Sep-2013 Dave Jones <davej@redhat.com>

[SCSI] aic7xxx: fix swapped arguments in ahc_find_pci_device

The prototype for ahc_9005_subdevinfo_valid shows that the caller has the
arguments in the wrong order.

637 ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor,
638 uint16_t subdevice, uint16_t subvendor)

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.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>


# 48813cf9 14-Jul-2010 Pekka Enberg <penberg@cs.helsinki.fi>

[SCSI] aic7xxx: Remove OS utility wrappers

This patch removes malloc(), free(), and printf() wrappers from the aic7xxx
SCSI driver. I didn't use pr_debug for printf because of some 'clever' uses of
printf don't compile with the pr_debug. I didn't fix the overeager uses of
GFP_ATOMIC either because I wanted to keep this patch as simple as possible.

[jejb:fixed up checkpatch errors and fixed up missed conversion]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 1beb6fa8 04-Mar-2009 Harvey Harrison <harvey.harrison@gmail.com>

[SCSI] replace __inline with inline

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# a2f5bfcf 25-Mar-2009 Hannes Reinecke <hare@suse.de>

[SCSI] aic7xxx: leaves timer running on init failure

aic79xx leaves timers inserted when ahd_init() (which inserts
two timers at its very end) succeeds but ahd_pci_map_int()
fails. In this case ahd->init_level gets incremented to 5 only
when that function succeeds, but ahd_free() calls ahd_shutdown()
only when ahd->init_level == 5, and ahd_shutdown() is where the
timers get removed. Since the freeing of the IRQ is not controlled
by ahd->init_level, we should increment init_level prior to
calling ahd_pci_map_int().

Reported-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 980b306a 24-Apr-2008 Denys Vlasenko <vda.linux@googlemail.com>

[SCSI] aic7xxx: add const

This patch adds more const keywords where appropriate.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 03e7925d 26-Jan-2008 FUJITA Tomonori <tomof@acm.org>

[SCSI] aic7xxx: fix warnings with CONFIG_PM disabled

CC [M] drivers/scsi/aic7xxx/aic7xxx_osm_pci.o
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:148: warning: 'ahc_linux_pci_dev_suspend' defined but not used
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:166: warning: 'ahc_linux_pci_dev_resume' defined but not used

This moves aic7xxx_pci_driver struct, removes some forward declarations,
and adds some ifdef CONFIG_PM.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# b5720729 19-Oct-2007 Hannes Reinecke <hare@suse.de>

[SCSI] aic7xxx: Add suspend/resume support

The aic7xxx driver already contains fragments for suspend/resume
support. So we only need to update them to the current interface
and have full PCI suspend/resume.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Tested-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 289fe5b1 20-Oct-2006 Adrian Bunk <bunk@stusta.de>

[SCSI] aic7xxx: cleanups

- make needlessly global code static

- #if 0 the following unused global functions:
- aic79xx_core.c: ahd_print_scb
- aic79xx_core.c: ahd_suspend
- aic79xx_core.c: ahd_resume
- aic79xx_core.c: ahd_dump_scbs
- aic79xx_osm.c: ahd_softc_comp

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# b2d8bfe1 10-Jun-2006 James Bottomley <jejb@mulgrave.il.steeleye.com>

[SCSI] aic7xxx: expose the bus setting to sysfs

Read the transciever register and display in the host transport
properties. I'm still not entirely sure what this does for multiple
transciever adapters (like some 160 ones) however, I suspect it
displays the transciever state of the switchable bus segment.

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


# 6391a113 08-Jun-2006 Tobias Klauser <tklauser@nuerscht.ch>

[SCSI] drivers/scsi: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of the macro.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# c42bcefb 18-Apr-2006 Denis Vlasenko <vda@ilport.com.ua>

[SCSI] aic7xxx: ahc_pci_write_config() fix

Fix ahc_pci_write_config's (wrong order of arguments).

Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 5e46631b 11-Jan-2006 Hannes Reinecke <hare@suse.de>

[SCSI] aic7xxx/aic79xx: New device ids

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


# 2a40342e 28-Jun-2005 Christoph Hellwig <hch@lst.de>

[SCSI] aic7xxx: remove ahc_tailq

now that we do normal PCI probing there's no need to keep a list of
all HBAs.

Rejections fixed up and
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!