Add support for the NetCell NC3000/5000 series SATA RAID cards.
Reviewed by: sos Approved by: imp (mentor) MFC after: 1 week
This commit is contained in:
parent
18d68737c0
commit
cece26a63a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166477
@ -118,6 +118,8 @@ static void ata_marvell_edma_dmasetprd(void *xsc, bus_dma_segment_t *segs, int n
|
||||
static void ata_marvell_edma_dmainit(device_t dev);
|
||||
static int ata_national_chipinit(device_t dev);
|
||||
static void ata_national_setmode(device_t dev, int mode);
|
||||
static int ata_netcell_chipinit(device_t dev);
|
||||
static int ata_netcell_allocate(device_t dev);
|
||||
static int ata_nvidia_chipinit(device_t dev);
|
||||
static int ata_nvidia_allocate(device_t dev);
|
||||
static int ata_nvidia_status(device_t dev);
|
||||
@ -2855,6 +2857,49 @@ ata_national_setmode(device_t dev, int mode)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* NetCell chipset support functions
|
||||
*/
|
||||
int
|
||||
ata_netcell_ident(device_t dev)
|
||||
{
|
||||
struct ata_pci_controller *ctlr = device_get_softc(dev);
|
||||
|
||||
if (pci_get_devid(dev) == ATA_NETCELL_SR) {
|
||||
device_set_desc(dev, "Netcell SyncRAID SR3000/5000 RAID Controller");
|
||||
ctlr->chipinit = ata_netcell_chipinit;
|
||||
return 0;
|
||||
}
|
||||
return ENXIO;
|
||||
}
|
||||
|
||||
static int
|
||||
ata_netcell_chipinit(device_t dev)
|
||||
{
|
||||
struct ata_pci_controller *ctlr = device_get_softc(dev);
|
||||
|
||||
if (ata_generic_chipinit(dev))
|
||||
return ENXIO;
|
||||
|
||||
ctlr->allocate = ata_netcell_allocate;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ata_netcell_allocate(device_t dev)
|
||||
{
|
||||
struct ata_channel *ch = device_get_softc(dev);
|
||||
|
||||
/* setup the usual register normal pci style */
|
||||
if (ata_pci_allocate(dev))
|
||||
return ENXIO;
|
||||
|
||||
/* don't use 32 bit PIO transfers; these cause the NetCell to return
|
||||
* garbage */
|
||||
ch->flags |= ATA_USE_16BIT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* nVidia chipset support functions
|
||||
|
@ -120,6 +120,10 @@ ata_pci_probe(device_t dev)
|
||||
if (!ata_national_ident(dev))
|
||||
return ATA_PROBE_OK;
|
||||
break;
|
||||
case ATA_NETCELL_ID:
|
||||
if (!ata_netcell_ident(dev))
|
||||
return ATA_PROBE_OK;
|
||||
break;
|
||||
case ATA_NVIDIA_ID:
|
||||
if (!ata_nvidia_ident(dev))
|
||||
return ATA_PROBE_OK;
|
||||
|
@ -198,6 +198,9 @@ struct ata_connect_task {
|
||||
#define ATA_NATIONAL_ID 0x100b
|
||||
#define ATA_SC1100 0x0502100b
|
||||
|
||||
#define ATA_NETCELL_ID 0x169c
|
||||
#define ATA_NETCELL_SR 0x0044169c
|
||||
|
||||
#define ATA_NVIDIA_ID 0x10de
|
||||
#define ATA_NFORCE1 0x01bc10de
|
||||
#define ATA_NFORCE2 0x006510de
|
||||
@ -450,6 +453,7 @@ int ata_jmicron_ident(device_t);
|
||||
int ata_marvell_ident(device_t);
|
||||
int ata_national_ident(device_t);
|
||||
int ata_nvidia_ident(device_t);
|
||||
int ata_netcell_ident(device_t);
|
||||
int ata_promise_ident(device_t);
|
||||
int ata_serverworks_ident(device_t);
|
||||
int ata_sii_ident(device_t);
|
||||
|
Loading…
Reference in New Issue
Block a user