| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.
A similar change was made in OpenBSD.
|
|
|
|
| |
malloc(9) flags in sys/dev.
|
|
|
|
|
|
| |
child is still present. If not, return 'handled' and don't print
anything (this is expected behavior). We expect an interrupt on eject,
power-down and/or shutdown.
|
|
|
|
|
|
| |
coherent.
MFC after: 2 weeks
|
| |
|
|
|
|
|
| |
Submitted by: Ganbold <ganbold@micom.mng.net>
Reviewed by: scottl
|
|
|
|
| |
Reviewed by: scottl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the interupt handler to a driver_intr_t type function as it was trying
to do way to much for a lightweight filter interrupt function.
Introduce much more locking around fc->mtx. Tested this for lock reversals
and other such lockups. Locking seems to be working better, but there
is much more to do with regard to locking. The most significant lock is
in the BUS RESET handler. It was possible, before this checkin, to set
a bus reset via "fwcontrol -r" and have the BUS RESET handler fire before
the code responsible for asserting BUS RESET was complete. This locking
fixes that issue.
Move some of the memory allocations in the fc struct to the attach function
in firewire.c
Rework the businfo.generation indicator to be merely a on/off bit now.
It's purpose according to spec is to notify the bus that the config ROM
has changed. That's it.
Catch and squash a possible panic in SBP where in the SBP_LOCK was held
during a possible error case. The error handling code would definitely
panic as it would try to acquire the SBP_LOCK on entrance.
Catch and squash a camcontrol/device lockup when firewire drives go away.
When a firewire device was powered off or disconnected from the firewire
bus, a "camcontrol rescan all" would hang trying to poll removed devices
as they were not properly detached. Don't do that.
Approved by: scottl
MFC after: 2 weeks
|
|
|
|
|
|
| |
- Fix a comment.
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
'device physically ejected?' message on resume.
- Fix memory leak on resume reported by kiyohara at netbsd.org.
MFC after: 2 weeks
|
| |
|
|
|
|
|
| |
- We are in FWBUSINIT state just after SID interrupt.
- Do not pass normal xfers before bus probe is done.
|
|
|
|
|
|
|
|
| |
This is enabled by default. It should be disabled for
those who are uneasy with peeking/poking from FireWire.
Please note sbp(4) and dcons(4) over FireWire need
this feature.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- lock its own locks and drop Giant.
- create its own taskqueue thread.
- split interrupt routine
- use interrupt filter as a fast interrupt.
- run watchdog timer in taskqueue so that it should be
serialized with the bottom half.
- add extra sanity check for transaction labels.
disable ad-hoc workaround for unknown tlabels.
- add sleep/wakeup synchronization primitives
- don't reset OHCI in fwohci_stop()
|
|
|
|
|
|
|
|
| |
- Wake up DMA engine after adding a new receive buffer.
- Skip buffers which have unknown state after error.
- More rigid error detection.
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
MFC: after 3 days
|
|
|
|
|
|
|
| |
This should fix NMI problem in fwphy_rddata().
PR: kern/94146 kern/100356
MFC: after 3 days
|
|
|
|
|
| |
It is unnecessary because retry is done by OHCI.
Further retry should be done by applications.
|
| |
|
| |
|
| |
|
|
|
|
| |
Submitted by: Coverity Prevent analysis tool
|
| |
|
|
|
|
| |
This driver seems to be fairly stable now.
|
|
|
|
| |
Bump __FreeBSD_version accordingly.
|
|
|
|
| |
they have the right values at the first bus reset.
|
|
|
|
| |
uint32_t where appropriate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* all
- s/__FUNCTION__/__func__/.
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
- Compatibility for RELENG_4 and DragonFly.
* firewire
- Timestamp just before queuing.
- Retry bus probe if it fails.
- Use device_printf() for debug message.
- Invalidiate CROM while update.
- Don't process minimum/invalid CROM.
* sbp
- Add ORB_SHORTAGE flag.
- Add sbp.tags tunable.
- Revive doorbell support. It's not enabled by default.
|
|
|
|
|
| |
bus on fwohci. This should fix attach failure caused by a race
between firewire and fwochi initialization for the kernel module.
|
|
|
|
| |
Reported by: Stanford Metacompilation research group
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* firewire
- Remove pending list.
- Ignore timeout for the FWXF_START state.
- Define M_FWMEM for debugging.
- Comment out DELAY() in fw_asybusy().
- Improve debugging messages
* sbp
- Freeze simq while bus reset.
|
|
|
|
| |
expected.
|
|
|
|
|
| |
Invalid OHCI version indicates OHCI registers are not mapped
correctly in PCI or CardBus layer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And many changes.
* all
- Major change of struct fw_xfer.
o {send,recv}.buf is splitted into hdr and payload.
o Remove unnecessary fields.
o spd is moved under send and recv.
- Remove unnecessary 'volatile' keyword.
- Add definition of rtcode and extcode.
* firewire.c
- Ignore FWDEVINVAL devices in fw_noderesolve_nodeid().
- Check the existance of the bind before call STAILQ_REMOVE().
- Fix bug in the fw_bindadd().
- Change element of struct fw_bind for simplicity.
- Check rtcode of response packet.
- Reduce split transaction timeout to 200 msec.
(100msec is the default value in the spec.)
- Set watchdog timer cycle to 10 Hz.
- Set xfer->tv just before calling fw_get_tlabel().
* fwohci.c
- Simplifies fwohci_get_plen().
* sbp.c
- Fix byte order of multibyte scsi_status informations.
- Split sbp.c and sbp.h.
- Unit number is not necessary for FIFO¤ address.
- Reduce LOGIN_DELAY and SCAN_DELAY to 1 sec.
- Add some constants defineded in SBP-2 spec.
* fwmem.c
- Introduce fwmem_strategy() and reduce memory copy.
|
| |
|
|
|
|
|
|
| |
This fixes the if_fwe problem with 1394b chip.
PR and Tested by: nork
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Tested by: wilko
- Detect memory mapping failure of registers by checking OHCI version.
Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>
|
|
|
|
|
| |
Allocate iso DMA channel dynamically. This allows us to have more
/dev/fw* than number of DMA channels for asyn. transactions and etc.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma. At the moment, this is used for the
asynchronous busdma_swi and callback mechanism. Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg. dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create(). The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms. The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.
Reviewed by: tmm, gibbs
|
| |
|
|
|
|
|
|
|
|
| |
- Initialize fc->status to process bus reset correctly after resume.
- Initialize AT ring buffer pointer.
- Requeue stdma to stfree for active IR buffer.
- Stop DMA before suspend for safe.
- Set powerstate after resume.
|