Commit Graph

31 Commits

Author SHA1 Message Date
mav
ade9ce1cf5 Plug memory leak to silent Coverity. Error is still not really handled.
Found with:   Coverity Prevent(tm)
CID:          4196
2010-06-05 08:16:21 +00:00
mav
ba504a17ee Fix attach errors handling.
Found with:   Coverity Prevent(tm)
CID:          3477
2010-06-05 08:14:19 +00:00
mav
98a829859d Fill rman range start/end values. It makes devinfo output more readable. 2010-05-22 08:30:47 +00:00
mav
810a32455d Report ATA/SATA channel number to NewBus at location string. 2010-05-22 07:32:47 +00:00
mav
2c96d9f1c5 Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.
2010-05-21 17:26:16 +00:00
mav
90843ddc5c Make SATA XPT negotiate and enable some additional SATA features, such as:
- device initiated power management (some devices support only this way);
 - Automatic Partial to Slumber Transition (more power saving);
 - DMA auto-activation (expected to slightly improve performance).
More features could be added later, when hardware supports.
2010-05-02 12:07:47 +00:00
mav
4137ab7278 Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent. 2010-04-30 08:22:47 +00:00
mav
6fc5d132fe Explicitly enable PCI busmastering on attach.
Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100).

H/W donated by:	Gheorghe Ardelean
2010-04-15 11:17:33 +00:00
mav
ce0f033be2 Enable MSI by default for SiI3124. 2010-03-20 04:40:15 +00:00
mav
03ce034456 MFp4:
After last running command completed, give commands in timeout state
second time.
2010-02-14 12:27:49 +00:00
mav
2cf2bd6f0a Use new helper functions to set PCIe max read request size. 2010-02-05 17:20:48 +00:00
mav
b5b6d6b0e0 - Give ATA/SATA SIMs info about ATAPI packet size, supported by device.
- Make ATA XPT to reject longer SCSI CDBs then supported by device, or
any SCSI CDBs, if device doesn't support ATAPI.
2010-02-02 11:09:28 +00:00
mav
d4a8a5b0f9 Reset port on disconnect event, to abort any running requests. 2010-01-29 12:47:04 +00:00
mav
72062fdcec MFp4: Large set of CAM inprovements.
- Unify bus reset/probe sequence. Whenever bus attached at boot or later,
CAM will automatically reset and scan it. It allows to remove duplicate
code from many drivers.
- Any bus, attached before CAM completed it's boot-time initialization,
will equally join to the process, delaying boot if needed.
- New kern.cam.boot_delay loader tunable should help controllers that
are still unable to register their buses in time (such as slow USB/
PCCard/ CardBus devices), by adding one more event to wait on boot.
- To allow synchronization between different CAM levels, concept of
requests priorities was extended. Priorities now split between several
"run levels". Device can be freezed at specified level, allowing higher
priority requests to pass. For example, no payload requests allowed,
until PMP driver enable port. ATA XPT negotiate transfer parameters,
periph driver configure caching and so on.
- Frozen requests are no more counted by request allocation scheduler.
It fixes deadlocks, when frozen low priority payload requests occupying
slots, required by higher levels to manage theit execution.
- Two last changes were holding proper ATA reinitialization and error
recovery implementation. Now it is done: SATA controllers and Port
Multipliers now implement automatic hot-plug and should correctly
recover from timeouts and bus resets.
- Improve SCSI error recovery for devices on buses without automatic sense
reporting, such as ATAPI or USB. For example, it allows CAM to wait, while
CD drive loads disk, instead of immediately return error status.
- Decapitalize diagnostic messages and make them more readable and sensible.
- Teach PMP driver to limit maximum speed on fan-out ports.
- Make boot wait for PMP scan completes, and make rescan more reliable.
- Fix pass driver, to return CCB to user level in case of error.
- Increase number of retries in cd driver, as device may return several UAs.
2010-01-28 08:41:30 +00:00
mav
b8a003ef1b Usually these controllers are able to automatically decode command code to
get required command protocol. But they have no idea about new commands,
such as DATA SET MANAGEMENT (TRIM). As soon as this info any way provided
by CAM, give controller specific instructions.
2009-12-29 21:49:11 +00:00
mav
8800df93b5 Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes.
It gives those beasts additional 10% of write bandwidth.
2009-12-09 13:10:10 +00:00
mav
f9cc15ef22 Explicitly acknowledge MSI completion, as required by SiI3124 datasheet.
It makes MSI working there. Later (and cheaper) PCIe chips (3132/3531)
still randomly crashing system in few seconds of high MSI rates, generating
something inaporopriate, like NMI or "Fatal trap 30".
2009-12-07 18:37:50 +00:00
mav
0f3cbe47eb SiI3124 has no SNotification register. Handle Asynchronous Notifications
there without it as good as possible.
2009-12-07 16:10:48 +00:00
mav
7c0d54bcfc MFp4:
Improve ATA mode/SATA revision control.
2009-11-26 08:49:46 +00:00
mav
b24d810911 MFp4:
- Extend XPT-SIM transfer settings control API. Now it allows to report to
SATA SIM number of tags supported by each device, implement ATA mode and
SATA revision negotiation for both SATA and PATA SIMs.
- Make ahci(4) and siis(4) to use submitted maximum tag number, when
scheduling requests. It allows to support NCQ on devices with lower tags
count then controller supports.
- Make PMP driver to report attached devices connection speeds.
- Implement ATA mode negotiation between user settings, device and
controller capabilities.
2009-11-24 12:47:58 +00:00
mav
70dd59cc69 Do not require payload data to be aligned. It is not mentioned in datasheet
and works fine in practice.
2009-11-16 20:54:47 +00:00
mav
17cadb1aa5 MFp4:
- Move tagged queueing control from ADA to ATA XPT. It allows to control
  device command queue length correctly. First step to support < 32 tags.
- Limit queue for non-tagged devices by 2 slots for ahci(4) and siis(4).
- Implement quirk matching for ATA devices.
- Move xpt_schedule_dev_sendq() from header to source file.
- Move delayed queue shrinking to the more expected place - element freeing.
- Remove some SCSIsms in ATA.
2009-11-11 11:10:36 +00:00
mav
c8078e95c2 MFp4:
Organize device IDs and add some more of them.
2009-11-10 09:46:52 +00:00
mav
3f81bf68ff Do not unarm callout on request completion and change slot selection
algorithm as done in ahci(4). This saves some CPU time on high request
rates.
2009-11-04 15:10:46 +00:00
mav
6261a13037 MFp4:
- Rework timeout handling, to make it more graceful for devices sharing
controller port (with PMP). Wait for other commands completion/timeout
before initiating recovery.
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.
2009-11-03 12:03:13 +00:00
mav
ed25b39810 Reimplement device reset sequence in more controller-specific way. 2009-10-23 21:33:26 +00:00
mav
bd4f73fc0a MFp4:
Report real max_target = 15. SIM doesn't need to know that target 15 is PMP.
It is XPT business.
2009-10-21 13:00:01 +00:00
mav
42d3f7f160 MFp4:
Freeze device queue on error to permit periph driver to do proper recovery.
2009-10-21 12:47:39 +00:00
mav
879668e11f On command timeout handle frozen command first, to not run it inside
XXX_end_transaction().

Submitted by:	avg
2009-10-07 15:40:04 +00:00
mav
d9691092f7 MFp4:
- Add SNTF support.
 - Do not report meaningless transport/protocol versions.
2009-08-30 15:06:03 +00:00
mav
cbc212df17 Add siis CAM driver for SiliconImage SiI3124/3132/3531 SATA2 controllers.
Driver supports Serial ATA and ATAPI devices, Port Multipliers
(including FIS-based switching), hardware command queues (31 command
per port) and Native Command Queuing. This is probably the second on
popularity, after AHCI, type of SATA2 controllers, that benefits from
using CAM, because of hardware command queuing support.

Approved by:    re (kib)
2009-07-21 12:32:46 +00:00