freebsd-dev/sys/dev/aac
Scott Long 8480cc638e o Move the cleanup of the fib maps into aac_free_commands() so as to
retain symetry with aac_alloc_commans().  Since aac_alloc_commands()
  allocates fib maps and places them onto the fib lists, aac_free_commands()
  should reverse those operations.

o Combine two ifs with the same body with an ||.

o Switch from uintptr_t to uint32_t for fib map load operations.
  The target is a uint32_t so using this type for the map load call
  avoids an extra cast.  uintptr_t should only be used when you need
  an "int sized the same as the machine's poitner size" which is not
  the case here.

o Removed the commented out M_WAITOK flag in the allocation in
  aac_alloc_commands().  The kernel will only block in the allocator
  if it can grow the size of the kernel.  This usually results in a
  page-out which could involve this aac device.  Thus, sleeping here
  could deadlock the machine.  Assuming this operation is occurring outside
  of attach time, we have enough fibs to operate anyway, so waiting for
  fibs to free up is okay if not optimal.

o In aac_alloc_commands(), if we cannot dmamem_alloc additional fib
  space, free the fib map.

o In aac_alloc_commands(), if we cannot create per-command dmamaps, don't
  lose track of the fib map that is mapping all of the commands that we
  have already released into the free pool.  Instead, just cut out of
  the loop and modify aac_free_commands to not attempt to free maps that
  have not been allocated.

o Don't use a magic number when pre-allocating fibs.

o Use PAGE_SIZE to allocate in page sized chunks instead of an
  architecture specific constant.

Submitted by: gibbs
2003-02-19 21:38:29 +00:00
..
aac_cam.c Teach the CAM module how to deregister itself so it can be unloaded. 2003-02-06 03:31:02 +00:00
aac_compat.h
aac_debug.c Major bugfixes for large memory and fast systems. 2003-01-11 01:59:21 +00:00
aac_disk.c Major bugfixes for large memory and fast systems. 2003-01-11 01:59:21 +00:00
aac_ioctl.h
aac_linux.c
aac_pci.c Implement a new dynamic command allocator. FIBs are allocated in 1 page 2003-02-10 00:34:24 +00:00
aac_tables.h
aac.c o Move the cleanup of the fib maps into aac_free_commands() so as to 2003-02-19 21:38:29 +00:00
aacreg.h Major bugfixes for large memory and fast systems. 2003-01-11 01:59:21 +00:00
aacvar.h o Move the cleanup of the fib maps into aac_free_commands() so as to 2003-02-19 21:38:29 +00:00