mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 02:36:42 +07:00
1726390539
The owner module reference of the pata_of_platform's scsi_host is initialized to pata_platform's one, because pata_of_platform driver use a scsi_host_template defined in pata_platform. So this drivers can be unloaded even if the scsi device is being accessed. This fixes it by propagating the scsi_host_template to pata_of_platform driver. The scsi_host_template is passed through a new argument of __pata_platform_probe(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org
31 lines
690 B
C
31 lines
690 B
C
#ifndef __LINUX_ATA_PLATFORM_H
|
|
#define __LINUX_ATA_PLATFORM_H
|
|
|
|
struct pata_platform_info {
|
|
/*
|
|
* I/O port shift, for platforms with ports that are
|
|
* constantly spaced and need larger than the 1-byte
|
|
* spacing used by ata_std_ports().
|
|
*/
|
|
unsigned int ioport_shift;
|
|
};
|
|
|
|
struct scsi_host_template;
|
|
|
|
extern int __pata_platform_probe(struct device *dev,
|
|
struct resource *io_res,
|
|
struct resource *ctl_res,
|
|
struct resource *irq_res,
|
|
unsigned int ioport_shift,
|
|
int __pio_mask,
|
|
struct scsi_host_template *sht);
|
|
|
|
/*
|
|
* Marvell SATA private data
|
|
*/
|
|
struct mv_sata_platform_data {
|
|
int n_ports; /* number of sata ports */
|
|
};
|
|
|
|
#endif /* __LINUX_ATA_PLATFORM_H */
|