Fix pcic_detach_socket to get right pcic_handle.
Pass sc->dev rather than a bogusly cast pccard_softc *sc. This allows us to insert and remove cards w/o panicing the kernel. However, the cis isn't mapped in, so the pccard_scan_cis function fails.
This commit is contained in:
parent
0d1337c6fa
commit
1b23908082
@ -92,7 +92,7 @@ pccard_read_cis(struct pccard_softc *sc)
|
||||
|
||||
state.pf = NULL;
|
||||
|
||||
if (pccard_scan_cis((struct device *)sc, pccard_parse_cis_tuple,
|
||||
if (pccard_scan_cis(sc->dev, pccard_parse_cis_tuple,
|
||||
&state) == -1)
|
||||
state.card->error++;
|
||||
}
|
||||
|
@ -1299,7 +1299,7 @@ pcic_enable_socket(device_t dev, device_t child)
|
||||
int
|
||||
pcic_disable_socket(device_t dev, device_t child)
|
||||
{
|
||||
struct pcic_handle *h = NULL; /* XXXIMPXXX */
|
||||
struct pcic_handle *h = pcic_get_handle(dev, child);
|
||||
DPRINTF(("pcic_chip_socket_disable\n"));
|
||||
|
||||
/* power down the socket */
|
||||
|
Loading…
x
Reference in New Issue
Block a user