History log of /freebsd-10-stable/sys/dev/tws/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
318806 24-May-2017 jpaetzel

MFC 318401

Increase the number of LUNs this hardware can support.

Experimentally we know this value works, but the hardware
may support an even higher value.

PR: 213876
Reported by: J.Catrysse@proximedia.be

315813 23-Mar-2017 mav

MFC r311305 (by asomers):
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)

The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are
fixed-length strings. AFAICT the only place they're read is in
sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.
However, the kernel doesn't null-terminate them. A bunch of copy-pasted code
uses strncpy to write them, and doesn't guarantee null-termination. For at
least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually
overflows. You can see the result by doing "camcontrol negotiate da0 -v".

This change null-terminates those fields everywhere they're set in the
kernel. It also shortens a few strings to ensure they'll fit within the
16-character field.

PR: 215474
Reported by: Coverity
CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005
CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000
CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014
CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021
CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027
CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187
CID: 1010035 1010036 1010042 1010041 1010040 1010039


/freebsd-10-stable/sys/cam/cam_xpt.c
/freebsd-10-stable/sys/cam/ctl/ctl_frontend_cam_sim.c
/freebsd-10-stable/sys/cam/scsi/scsi_low.c
/freebsd-10-stable/sys/dev/aac/aac_cam.c
/freebsd-10-stable/sys/dev/aacraid/aacraid_cam.c
/freebsd-10-stable/sys/dev/advansys/advansys.c
/freebsd-10-stable/sys/dev/advansys/adwcam.c
/freebsd-10-stable/sys/dev/aha/aha.c
/freebsd-10-stable/sys/dev/ahb/ahb.c
/freebsd-10-stable/sys/dev/ahci/ahci.c
/freebsd-10-stable/sys/dev/ahci/ahciem.c
/freebsd-10-stable/sys/dev/aic/aic.c
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx_osm.c
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx_osm.c
/freebsd-10-stable/sys/dev/amr/amr_cam.c
/freebsd-10-stable/sys/dev/arcmsr/arcmsr.c
/freebsd-10-stable/sys/dev/ata/ata-all.c
/freebsd-10-stable/sys/dev/buslogic/bt.c
/freebsd-10-stable/sys/dev/ciss/ciss.c
/freebsd-10-stable/sys/dev/dpt/dpt_scsi.c
/freebsd-10-stable/sys/dev/esp/ncr53c9x.c
/freebsd-10-stable/sys/dev/firewire/sbp.c
/freebsd-10-stable/sys/dev/firewire/sbp_targ.c
/freebsd-10-stable/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
/freebsd-10-stable/sys/dev/hptiop/hptiop.c
/freebsd-10-stable/sys/dev/hptmv/entry.c
/freebsd-10-stable/sys/dev/hptnr/hptnr_osm_bsd.c
/freebsd-10-stable/sys/dev/hptrr/hptrr_osm_bsd.c
/freebsd-10-stable/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
/freebsd-10-stable/sys/dev/iir/iir.c
/freebsd-10-stable/sys/dev/isci/isci_controller.c
/freebsd-10-stable/sys/dev/iscsi_initiator/isc_cam.c
/freebsd-10-stable/sys/dev/isp/isp_freebsd.c
/freebsd-10-stable/sys/dev/mfi/mfi_cam.c
/freebsd-10-stable/sys/dev/mly/mly.c
/freebsd-10-stable/sys/dev/mpr/mpr_sas.c
/freebsd-10-stable/sys/dev/mps/mps_sas.c
/freebsd-10-stable/sys/dev/mpt/mpt_cam.c
/freebsd-10-stable/sys/dev/mrsas/mrsas_cam.c
/freebsd-10-stable/sys/dev/mvs/mvs.c
/freebsd-10-stable/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
/freebsd-10-stable/sys/dev/ppbus/vpo.c
/freebsd-10-stable/sys/dev/siis/siis.c
/freebsd-10-stable/sys/dev/sym/sym_hipd.c
/freebsd-10-stable/sys/dev/trm/trm.c
/freebsd-10-stable/sys/dev/twa/tw_osl_cam.c
tws_cam.c
/freebsd-10-stable/sys/dev/virtio/scsi/virtio_scsi.c
/freebsd-10-stable/sys/powerpc/ps3/ps3cdrom.c
/freebsd-10-stable/sys/powerpc/pseries/phyp_vscsi.c
314667 04-Mar-2017 avg

MFC r283291: don't use CALLOUT_MPSAFE with callout_init()

The main purpose of this MFC is to reduce conflicts for other merges.
Parts of the original change have already "trickled down" via individual MFCs.


/freebsd-10-stable/sys/amd64/amd64/mp_watchdog.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/freebsd-10-stable/sys/cddl/dev/profile/profile.c
/freebsd-10-stable/sys/compat/ndis/subr_ntoskrnl.c
/freebsd-10-stable/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
/freebsd-10-stable/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
/freebsd-10-stable/sys/dev/ath/if_ath.c
/freebsd-10-stable/sys/dev/ce/if_ce.c
/freebsd-10-stable/sys/dev/cp/if_cp.c
/freebsd-10-stable/sys/dev/ctau/if_ct.c
/freebsd-10-stable/sys/dev/cx/if_cx.c
/freebsd-10-stable/sys/dev/cxgb/cxgb_main.c
/freebsd-10-stable/sys/dev/cxgb/cxgb_sge.c
/freebsd-10-stable/sys/dev/dcons/dcons_os.c
/freebsd-10-stable/sys/dev/drm2/drm_irq.c
/freebsd-10-stable/sys/dev/drm2/i915/intel_display.c
/freebsd-10-stable/sys/dev/glxsb/glxsb.c
/freebsd-10-stable/sys/dev/gxemul/cons/gxemul_cons.c
/freebsd-10-stable/sys/dev/hifn/hifn7751.c
/freebsd-10-stable/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
/freebsd-10-stable/sys/dev/if_ndis/if_ndis.c
/freebsd-10-stable/sys/dev/isci/isci_io_request.c
/freebsd-10-stable/sys/dev/mfi/mfi.c
/freebsd-10-stable/sys/dev/mwl/if_mwl.c
/freebsd-10-stable/sys/dev/nand/nandsim_chip.c
/freebsd-10-stable/sys/dev/ntb/ntb_hw/ntb_hw.c
/freebsd-10-stable/sys/dev/nxge/if_nxge.c
/freebsd-10-stable/sys/dev/oce/oce_if.c
/freebsd-10-stable/sys/dev/patm/if_patm_attach.c
/freebsd-10-stable/sys/dev/rndtest/rndtest.c
/freebsd-10-stable/sys/dev/safe/safe.c
/freebsd-10-stable/sys/dev/sound/midi/mpu401.c
/freebsd-10-stable/sys/dev/sound/pci/atiixp.c
/freebsd-10-stable/sys/dev/sound/pci/es137x.c
/freebsd-10-stable/sys/dev/sound/pci/hda/hdaa.c
/freebsd-10-stable/sys/dev/sound/pci/hda/hdac.c
/freebsd-10-stable/sys/dev/sound/pci/via8233.c
/freebsd-10-stable/sys/dev/twa/tw_osl_freebsd.c
tws.c
/freebsd-10-stable/sys/dev/ubsec/ubsec.c
/freebsd-10-stable/sys/dev/virtio/random/virtio_random.c
/freebsd-10-stable/sys/dev/xen/netfront/netfront.c
/freebsd-10-stable/sys/fs/nfs/nfs_commonport.c
/freebsd-10-stable/sys/gdb/gdb_cons.c
/freebsd-10-stable/sys/geom/gate/g_gate.c
/freebsd-10-stable/sys/geom/journal/g_journal.c
/freebsd-10-stable/sys/geom/mirror/g_mirror.c
/freebsd-10-stable/sys/geom/raid3/g_raid3.c
/freebsd-10-stable/sys/geom/sched/gs_rr.c
/freebsd-10-stable/sys/i386/i386/mp_watchdog.c
/freebsd-10-stable/sys/kern/init_main.c
/freebsd-10-stable/sys/kern/kern_synch.c
/freebsd-10-stable/sys/kern/kern_thread.c
/freebsd-10-stable/sys/kern/subr_vmem.c
/freebsd-10-stable/sys/kern/uipc_domain.c
/freebsd-10-stable/sys/mips/cavium/octe/ethernet.c
/freebsd-10-stable/sys/mips/cavium/octeon_rnd.c
/freebsd-10-stable/sys/mips/nlm/dev/net/xlpge.c
/freebsd-10-stable/sys/mips/rmi/dev/xlr/rge.c
/freebsd-10-stable/sys/net/if_spppsubr.c
/freebsd-10-stable/sys/net80211/ieee80211_ht.c
/freebsd-10-stable/sys/net80211/ieee80211_hwmp.c
/freebsd-10-stable/sys/net80211/ieee80211_mesh.c
/freebsd-10-stable/sys/net80211/ieee80211_node.c
/freebsd-10-stable/sys/net80211/ieee80211_proto.c
/freebsd-10-stable/sys/netgraph/netflow/ng_netflow.c
/freebsd-10-stable/sys/netgraph/netgraph.h
/freebsd-10-stable/sys/netinet/in_pcb.c
/freebsd-10-stable/sys/netinet/ip_mroute.c
/freebsd-10-stable/sys/netinet/tcp_hostcache.c
/freebsd-10-stable/sys/netinet/tcp_subr.c
/freebsd-10-stable/sys/netinet6/in6_rmx.c
/freebsd-10-stable/sys/netpfil/ipfw/ip_dummynet.c
/freebsd-10-stable/sys/netpfil/ipfw/ip_fw_dynamic.c
/freebsd-10-stable/sys/netpfil/pf/if_pfsync.c
/freebsd-10-stable/sys/ofed/include/linux/timer.h
/freebsd-10-stable/sys/ofed/include/linux/workqueue.h
/freebsd-10-stable/sys/powerpc/mambo/mambo_console.c
/freebsd-10-stable/sys/powerpc/pseries/phyp_console.c
/freebsd-10-stable/sys/sys/callout.h
/freebsd-10-stable/sys/vm/uma_core.c
/freebsd-10-stable/sys/x86/x86/mca.c
312398 18-Jan-2017 marius

MFC: r296135

Replace several bus_alloc_resource() calls with bus_alloc_resource_any()

Most of these are BARs, and we allocate them in their entirety. The one
outlier in this is amdsbwd(4), which calls bus_set_resource() prior.

275982 21-Dec-2014 smh

MFC r274819:
Prevent overflow issues in timeout processing

MFC r274852:
Fix build with asr driver

Sponsored by: Multiplay

275977 21-Dec-2014 smh

MFC r272000:
Switch from timeout(9) to callout(9)

Sponsored by: Multiplay

263125 14-Mar-2014 delphij

MFC r262572:

Get rid of the 'chan' from softc structure and use the latter
directly as sleep channel.

PR: kern/174684
Submitted by: jmg

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255871 25-Sep-2013 scottl

Re-do r255853. Along with adding back the API/ABI changes from the
original, this hides the contents of cam_compat.h from ktrace/kdump/truss,
avoiding problems there. There are no user-servicable parts in there, so
no need for those tools to be groping around in there.

Approved by: re


255865 25-Sep-2013 gjb

Revert r255853 pending fixes to build errors in usr.bin/kdump

Approved by: re (implicit)


255853 24-Sep-2013 scottl

Update the CAM API for FreeBSD 10:

- Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0;
MPSAFE drivers should be managing their own timeout storage. The
remaining non-MPSAFE drivers have been modified to also manage their own
storage, and should be considered for updating to MPSAFE (or removal)
during the FreeBSD 10.x lifecycle.

- Add fields related to soft timeouts and quality of service, to be used
in upcoming work.

- Add room for more flags in the CCB header and path_inq structures.

- Begin support for extended 64-bit LUNs.

- Bump the CAM version number to 0x18, but add compat shims. Tested with
camcontrol and smartctl.

Reviewed by: nathanw, ken, kib
Approved by: re
Obtained from: Netflix


254263 12-Aug-2013 scottl

Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register. The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR. Thus, the bit is no longer
a reliable indication of capability, and should not be checked. This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by: jhb
Reviewed by: jfv, marius, achadd, achim
MFC after: 1 day


250936 23-May-2013 kib

Fix typo in the definition of the TWS_DATA_CCB.

Submitted by: Andreas Turriff <maillist@turriff.net>


249468 14-Apr-2013 mav

MFprojects/camlock r248982:
Stop abusing xpt_periph in random plases that really have no periph related
to CCB, for example, bus scanning. NULL value is fine in such cases and it
is correctly logged in debug messages as "noperiph". If at some point we
need some real XPT periphs (alike to pmpX now), quite likely they will be
per-bus, and not a single global instance as xpt_periph now.


248973 01-Apr-2013 mav

Slightly tune locking to not call xpt_alloc_ccb() that is allowed to sleep
while holding the SIM mutex.


247551 01-Mar-2013 kevlo

Fix typo.


246713 12-Feb-2013 kib

Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c. It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code. The MD busdma is then given a chance to do any final processing
in the complete() callback.

The cam changes unify the bus_dmamap_load* handling in cam drivers.

The arm and mips implementations are updated to track virtual
addresses for sync(). Previously this was done in a type specific
way. Now it is done in a generic way by recording the list of
virtuals in the map.

Submitted by: jeff (sponsored by EMC/Isilon)
Reviewed by: kan (previous version), scottl,
mjacob (isp(4), no objections for target mode changes)
Discussed with: ian (arm changes)
Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)


241753 19-Oct-2012 delphij

Integrate changes from LSI vendor driver 10.80.00.005 to FreeBSD.

PR: kern/172833
Submitted by: "Charles O'Donnell" <cao bus net>
MFC after: 1 week


240901 24-Sep-2012 jimharris

Use CAM_SEL_TIMEOUT and CAM_DEV_NOT_THERE to report missing targets or
LUNs respectively. This removes a huge number of error messages
from CAM during bus scans.

Copied almost verbatim from mav's commit r237460.

Submitted by: Mike Tancsa <mike at sentex dot net>
MFC after: 3 days


240900 24-Sep-2012 jimharris

Specify MTX_RECURSE for the controller's io_lock. Without it, tws(4)
immediately panics on boot with INVARIANTS enabled. The driver already
clearly expects to be able to recurse on this mutex - the main I/O
is always recursing on this lock.

Reported and tested by: Mike Tancsa <mike at sentex dot net>
MFC after: 1 week


232854 12-Mar-2012 scottl

Convert a number of drivers to obtaining their parent DMA tag from their
PCI device attachment.


230200 16-Jan-2012 delphij

Match surrounding style.

Noticed by: avg


229416 03-Jan-2012 delphij

Don't forget to release queue lock when allocation of memory failed.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly
MFC after: 2 weeks


228443 12-Dec-2011 mdf

Do not define bool/true/false if the symbols already exist.

MFC after: 2 weeks
Sponsored by: Isilon Systems, LLC


227843 22-Nov-2011 marius

- There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.


226887 28-Oct-2011 delphij

Don't expose a constant array into global namespace.

Reported by: Ruslan Yakovlev <quazi bk ru> via yongari
MFC after: 3 days


226476 17-Oct-2011 delphij

Return BUS_PROBE_DEFAULT instead of 0 (BUS_PROBE_SPECIFIC), allowing
vendor provided driver to override in kernel driver.

MFC after: 3 days


226026 04-Oct-2011 delphij

Add the 9750 SATA+SAS 6Gb/s RAID controller card driver, tws(4). Many
thanks for their contiued support to FreeBSD.

This is version 10.80.00.003 from codeset 10.2.1 [1]

Obtained from: LSI http://kb.lsi.com/Download16574.aspx [1]