freebsd-dev/sys/dev/isp
Luigi Rizzo 33d5497079 Cleanup and document the implementation of firmware(9) based on
a version that i posted earlier on the -current mailing list,
and subsequent feedback received.

The core of the change is just in sys/firmware.h and kern/subr_firmware.c,
while other files are just adaptation of the clients to the ABI change
(const-ification of some parameters and hiding of internal info,
so this is fully compatible at the binary level).

In detail:
- reduce the amount of information exported to clients in struct firmware,
  and constify the pointer;

- internally, document and simplify the implementation of the various
  functions, and make sure error conditions are dealt with properly.

The diffs are large, but the code is really straightforward now (i hope).

Note also that there is a subtle issue with the implementation of
firmware_register(): currently, as in the previous version, we just
store a reference to the 'imagename' argument, but we should rather
copy it because there is no guarantee that this is a static string.
I realised this while testing this code, but i prefer to fix it in
a later commit -- there is no regression with respect to the past.

Note, too, that the version in RELENG_6 has various bugs including
missing locks around the module release calls, mishandling of modules
loaded by /boot/loader, and so on, so an MFC is absolutely necessary
there.  I was just postponing it until this cleanup to avoid doing
things twice.

MFC after: 1 week
2007-02-15 17:21:31 +00:00
..
DriverManual.txt
Hardware.txt
isp_freebsd.c MFP4: Move default setting to the end of isp_reset instead of the 2007-01-20 04:00:21 +00:00
isp_freebsd.h Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
isp_ioctl.h Fix RELENG_4 code version- isp_roles wasn't getting initialized so 2006-08-21 00:46:10 +00:00
isp_library.c Make the SAN login/logout stuff more common between different chipsets 2006-11-18 03:53:16 +00:00
isp_library.h Make the SAN login/logout stuff more common between different chipsets 2006-11-18 03:53:16 +00:00
isp_pci.c add a missing piece for 2432 2007-02-10 04:00:57 +00:00
isp_sbus.c Clean up some of the various platform and release specific dma tag 2007-01-23 00:02:29 +00:00
isp_stds.h Push things closer to path failover by implementing loop down and 2006-11-14 08:45:48 +00:00
isp_target.c Grumble- let a linux-ism slip in and had an llx which 2007-01-20 07:38:31 +00:00
isp_target.h MFP4: Move default setting to the end of isp_reset instead of the 2007-01-20 04:00:21 +00:00
isp_tpublic.h MFP4: Move default setting to the end of isp_reset instead of the 2007-01-20 04:00:21 +00:00
isp.c MFP4: Move default setting to the end of isp_reset instead of the 2007-01-20 04:00:21 +00:00
ispmbox.h Try an experiment with using DMA to load firmware into a 2200- VERIFY 2006-12-17 16:59:19 +00:00
ispreg.h Add 4Gb (24XX) support and lay the foundation for a lot of new stuff. 2006-11-02 03:21:32 +00:00
ispvar.h MFP4: Move default setting to the end of isp_reset instead of the 2007-01-20 04:00:21 +00:00