9

10

11

If the user sets media that the card does not have, the interface may not work.

Selects the new mode.

Resets the device to pick up the new mode (if the interface was running).

The default case returns an error that indicates that the caller has issued an invalid ioctl command.

12.17 Releasing the Simple Lock and Resetting the IPL

The following code shows how the el_ioctl( ) routine releases the simple lock and resets the IPL:

if (lock_on) { 1 simple_unlock(&sc->el_softc_lock); splx(s);

}

return (status);

}

2

1

2

If the simple lock is still held, calls the simple_unlock( ) routine.

Returns the status of the ioctl request.

Implementing the ioctl Section 12–13

Page 137
Image 137
Compaq AA-RNG2A-TE manual If lockon 1 simpleunlock&sc-elsoftclock splxs Return status