SCSI fixes for 2.6.32-rc3
Subsystems (16)
This is mostly fixes. However, it contains two new drivers: Brocade SAS (bfa), the Bladengine2 iSCSI (be2iscsi) under the merge window exemption (There's also an update to pmcraid which isn't strictly a bug fix, but which is currently also under the merge window exemption as a new driver in the 2.6.32 merge window). There's also an update to our DIF/DIX infrastructure to add DIF type 2 (lacking DIF type 2 is the bug we're fixing here).
The patch is available from:
master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
The short changelog is:
Anil Ravindranath (1):
pmcraid: Changed driver prints to scmd/sdev_printk
Anil Veerabhadrappa (1):
bnx2i: Fix context mapping issue for architectures with PAGE_SIZE != 4096
Anirban Chakraborty (1):
qla2xxx: Fix NULL ptr deref bug in fail path during queue create
Christof Schmitt (6):
zfcp: Fix hang when offlining device with offline chpid
zfcp: Fix lockdep warning when offlining device with offline chpid
zfcp: Fix oops during shutdown of offline device
zfcp: Fix initial device and cfdc for delayed adapter allocation
zfcp: correctly initialize unchained requests
sg: Free data buffers after calling blk_rq_unmap_user
David Jeffery (1):
st: fix possible memory use after free after MTSETBLK ioctl
Hannes Reinecke (1):
Retry ADD_TO_MLQUEUE return value for EH commands
HighPoint Linux Team (1):
hptiop: Add RR44xx adapter support
Jayamohan Kallickal (3):
be2iscsi: Moving to pci_pools v3
libiscsi: iscsi_session_setup to allow for private space
be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver
Jing Huang (1):
bfa: Brocade BFA FC SCSI driver
Kashyap, Desai (9):
mpt2sas: Bump version 02.100.03.00
mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT
mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on firmware to ACK.
mpt2sas: Call init_completion on a per request basis.
mpt2sas: Target Reset will be issued from Interrupt context.
mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
mpt2sas: Copyright change to 2009.
mpt2sas: Added mpi2_history.txt for MPI2 headers.
mpt2sas: Update driver to MPI2 REV K headers.
Martin K. Petersen (5):
scsi_debug: Implement support for DIF Type 2
sd: Support disks formatted with DIF Type 2 Fix protection scsi_data_buffer leak
sd: Detach DIF from block integrity infrastructure Deprecate SCSI_PROT_*_CONVERT operations
Moger, Babu (1):
scsi_dh_rdac: Fix for returning correct mode select cmd return info
Nick Cheng (1):
mvsas: Support Areca SAS/SATA HBA, ARC-1300/1320
Randy Dunlap (1):
scsi_transport_fc: fix missing kernel-doc
Tejun Heo (1):
sr: consider the last written sector when determining media size
The diffstat is:
Documentation/scsi/hptiop.txt | 21 MAINTAINERS | 15 drivers/infiniband/ulp/iser/iscsi_iser.c | 2 drivers/s390/scsi/zfcp_aux.c | 33 drivers/s390/scsi/zfcp_ccw.c | 40 drivers/s390/scsi/zfcp_cfdc.c | 17 drivers/s390/scsi/zfcp_ext.h | 2 drivers/s390/scsi/zfcp_fsf.c | 22 drivers/scsi/Kconfig | 11 drivers/scsi/Makefile | 2 drivers/scsi/be2iscsi/Kconfig | 8 drivers/scsi/be2iscsi/Makefile | 8 drivers/scsi/be2iscsi/be.h | 183 + drivers/scsi/be2iscsi/be_cmds.c | 523 +++ drivers/scsi/be2iscsi/be_cmds.h | 877 +++++ drivers/scsi/be2iscsi/be_iscsi.c | 638 +++ drivers/scsi/be2iscsi/be_iscsi.h | 75 drivers/scsi/be2iscsi/be_main.c | 3390 +++++++++++++++++++++ drivers/scsi/be2iscsi/be_main.h | 837 +++++ drivers/scsi/be2iscsi/be_mgmt.c | 321 + drivers/scsi/be2iscsi/be_mgmt.h | 249 + drivers/scsi/bfa/Makefile | 15 drivers/scsi/bfa/bfa_callback_priv.h | 57 drivers/scsi/bfa/bfa_cb_ioim_macros.h | 205 + drivers/scsi/bfa/bfa_cee.c | 492 +++ drivers/scsi/bfa/bfa_core.c | 402 ++ drivers/scsi/bfa/bfa_csdebug.c | 58 drivers/scsi/bfa/bfa_fcpim.c | 175 + drivers/scsi/bfa/bfa_fcpim_priv.h | 188 + drivers/scsi/bfa/bfa_fcport.c | 1671 ++++++++++ drivers/scsi/bfa/bfa_fcs.c | 182 + drivers/scsi/bfa/bfa_fcs_lport.c | 940 +++++ drivers/scsi/bfa/bfa_fcs_port.c | 68 drivers/scsi/bfa/bfa_fcs_uf.c | 105 drivers/scsi/bfa/bfa_fcxp.c | 782 ++++ drivers/scsi/bfa/bfa_fcxp_priv.h | 138 drivers/scsi/bfa/bfa_fwimg_priv.h | 31 drivers/scsi/bfa/bfa_hw_cb.c | 142 drivers/scsi/bfa/bfa_hw_ct.c | 162 + drivers/scsi/bfa/bfa_intr.c | 218 + drivers/scsi/bfa/bfa_intr_priv.h | 115 drivers/scsi/bfa/bfa_ioc.c | 2382 ++++++++++++++ drivers/scsi/bfa/bfa_ioc.h | 259 + drivers/scsi/bfa/bfa_iocfc.c | 872 +++++ drivers/scsi/bfa/bfa_iocfc.h | 168 + drivers/scsi/bfa/bfa_iocfc_q.c | 44 drivers/scsi/bfa/bfa_ioim.c | 1311 ++++++++ drivers/scsi/bfa/bfa_itnim.c | 1088 ++++++ drivers/scsi/bfa/bfa_log.c | 346 ++ drivers/scsi/bfa/bfa_log_module.c | 451 ++ drivers/scsi/bfa/bfa_lps.c | 782 ++++ drivers/scsi/bfa/bfa_lps_priv.h | 38 drivers/scsi/bfa/bfa_module.c | 90 drivers/scsi/bfa/bfa_modules_priv.h | 43 drivers/scsi/bfa/bfa_os_inc.h | 222 + drivers/scsi/bfa/bfa_port.c | 460 ++ drivers/scsi/bfa/bfa_port_priv.h | 90 drivers/scsi/bfa/bfa_priv.h | 113 drivers/scsi/bfa/bfa_rport.c | 911 +++++ drivers/scsi/bfa/bfa_rport_priv.h | 45 drivers/scsi/bfa/bfa_sgpg.c | 231 + drivers/scsi/bfa/bfa_sgpg_priv.h | 79 drivers/scsi/bfa/bfa_sm.c | 38 drivers/scsi/bfa/bfa_timer.c | 90 drivers/scsi/bfa/bfa_trcmod_priv.h | 66 drivers/scsi/bfa/bfa_tskim.c | 689 ++++ drivers/scsi/bfa/bfa_uf.c | 345 ++ drivers/scsi/bfa/bfa_uf_priv.h | 47 drivers/scsi/bfa/bfad.c | 1182 +++++++ drivers/scsi/bfa/bfad_attr.c | 649 ++++ drivers/scsi/bfa/bfad_attr.h | 65 drivers/scsi/bfa/bfad_drv.h | 295 + drivers/scsi/bfa/bfad_fwimg.c | 95 drivers/scsi/bfa/bfad_im.c | 1230 +++++++ drivers/scsi/bfa/bfad_im.h | 150 drivers/scsi/bfa/bfad_im_compat.h | 46 drivers/scsi/bfa/bfad_intr.c | 214 + drivers/scsi/bfa/bfad_ipfc.h | 42 drivers/scsi/bfa/bfad_os.c | 50 drivers/scsi/bfa/bfad_tm.h | 59 drivers/scsi/bfa/bfad_trcmod.h | 52 drivers/scsi/bfa/fab.c | 62 drivers/scsi/bfa/fabric.c | 1278 +++++++ drivers/scsi/bfa/fcbuild.c | 1449 ++++++++ drivers/scsi/bfa/fcbuild.h | 273 + drivers/scsi/bfa/fcpim.c | 844 +++++ drivers/scsi/bfa/fcptm.c | 68 drivers/scsi/bfa/fcs.h | 30 drivers/scsi/bfa/fcs_auth.h | 37 drivers/scsi/bfa/fcs_fabric.h | 61 drivers/scsi/bfa/fcs_fcpim.h | 44 drivers/scsi/bfa/fcs_fcptm.h | 45 drivers/scsi/bfa/fcs_fcxp.h | 29 drivers/scsi/bfa/fcs_lport.h | 117 drivers/scsi/bfa/fcs_ms.h | 35 drivers/scsi/bfa/fcs_port.h | 32 drivers/scsi/bfa/fcs_rport.h | 61 drivers/scsi/bfa/fcs_trcmod.h | 56 drivers/scsi/bfa/fcs_uf.h | 32 drivers/scsi/bfa/fcs_vport.h | 39 drivers/scsi/bfa/fdmi.c | 1223 +++++++ drivers/scsi/bfa/include/aen/bfa_aen.h | 92 drivers/scsi/bfa/include/aen/bfa_aen_adapter.h | 31 drivers/scsi/bfa/include/aen/bfa_aen_audit.h | 31 drivers/scsi/bfa/include/aen/bfa_aen_ethport.h | 35 drivers/scsi/bfa/include/aen/bfa_aen_ioc.h | 37 drivers/scsi/bfa/include/aen/bfa_aen_itnim.h | 33 drivers/scsi/bfa/include/aen/bfa_aen_lport.h | 51 drivers/scsi/bfa/include/aen/bfa_aen_port.h | 57 drivers/scsi/bfa/include/aen/bfa_aen_rport.h | 37 drivers/scsi/bfa/include/bfa.h | 177 + drivers/scsi/bfa/include/bfa_fcpim.h | 159 drivers/scsi/bfa/include/bfa_fcptm.h | 47 drivers/scsi/bfa/include/bfa_svc.h | 324 ++ drivers/scsi/bfa/include/bfa_timer.h | 53 drivers/scsi/bfa/include/bfi/bfi.h | 174 + drivers/scsi/bfa/include/bfi/bfi_boot.h | 34 drivers/scsi/bfa/include/bfi/bfi_cbreg.h | 305 + drivers/scsi/bfa/include/bfi/bfi_cee.h | 119 drivers/scsi/bfa/include/bfi/bfi_ctreg.h | 611 +++ drivers/scsi/bfa/include/bfi/bfi_fabric.h | 92 drivers/scsi/bfa/include/bfi/bfi_fcpim.h | 301 + drivers/scsi/bfa/include/bfi/bfi_fcxp.h | 71 drivers/scsi/bfa/include/bfi/bfi_ioc.h | 202 + drivers/scsi/bfa/include/bfi/bfi_iocfc.h | 177 + drivers/scsi/bfa/include/bfi/bfi_lport.h | 89 drivers/scsi/bfa/include/bfi/bfi_lps.h | 96 drivers/scsi/bfa/include/bfi/bfi_port.h | 115 drivers/scsi/bfa/include/bfi/bfi_pport.h | 184 + drivers/scsi/bfa/include/bfi/bfi_rport.h | 104 drivers/scsi/bfa/include/bfi/bfi_uf.h | 52 drivers/scsi/bfa/include/cna/bfa_cna_trcmod.h | 36 drivers/scsi/bfa/include/cna/cee/bfa_cee.h | 77 drivers/scsi/bfa/include/cna/port/bfa_port.h | 69 drivers/scsi/bfa/include/cna/pstats/ethport_defs.h | 36 drivers/scsi/bfa/include/cna/pstats/phyport_defs.h | 218 + drivers/scsi/bfa/include/cs/bfa_checksum.h | 60 drivers/scsi/bfa/include/cs/bfa_debug.h | 44 drivers/scsi/bfa/include/cs/bfa_log.h | 184 + drivers/scsi/bfa/include/cs/bfa_perf.h | 34 drivers/scsi/bfa/include/cs/bfa_plog.h | 162 + drivers/scsi/bfa/include/cs/bfa_q.h | 81 drivers/scsi/bfa/include/cs/bfa_sm.h | 69 drivers/scsi/bfa/include/cs/bfa_trc.h | 176 + drivers/scsi/bfa/include/cs/bfa_wc.h | 68 drivers/scsi/bfa/include/defs/bfa_defs_adapter.h | 82 drivers/scsi/bfa/include/defs/bfa_defs_aen.h | 73 drivers/scsi/bfa/include/defs/bfa_defs_audit.h | 38 drivers/scsi/bfa/include/defs/bfa_defs_auth.h | 112 drivers/scsi/bfa/include/defs/bfa_defs_boot.h | 71 drivers/scsi/bfa/include/defs/bfa_defs_cee.h | 159 drivers/scsi/bfa/include/defs/bfa_defs_driver.h | 40 drivers/scsi/bfa/include/defs/bfa_defs_ethport.h | 98 drivers/scsi/bfa/include/defs/bfa_defs_fcpim.h | 45 drivers/scsi/bfa/include/defs/bfa_defs_im_common.h | 32 drivers/scsi/bfa/include/defs/bfa_defs_im_team.h | 72 drivers/scsi/bfa/include/defs/bfa_defs_ioc.h | 152 drivers/scsi/bfa/include/defs/bfa_defs_iocfc.h | 310 + drivers/scsi/bfa/include/defs/bfa_defs_ipfc.h | 70 drivers/scsi/bfa/include/defs/bfa_defs_itnim.h | 126 drivers/scsi/bfa/include/defs/bfa_defs_led.h | 35 drivers/scsi/bfa/include/defs/bfa_defs_lport.h | 68 drivers/scsi/bfa/include/defs/bfa_defs_mfg.h | 58 drivers/scsi/bfa/include/defs/bfa_defs_pci.h | 41 drivers/scsi/bfa/include/defs/bfa_defs_pm.h | 33 drivers/scsi/bfa/include/defs/bfa_defs_pom.h | 56 drivers/scsi/bfa/include/defs/bfa_defs_port.h | 245 + drivers/scsi/bfa/include/defs/bfa_defs_pport.h | 383 ++ drivers/scsi/bfa/include/defs/bfa_defs_qos.h | 99 drivers/scsi/bfa/include/defs/bfa_defs_rport.h | 199 + drivers/scsi/bfa/include/defs/bfa_defs_status.h | 255 + drivers/scsi/bfa/include/defs/bfa_defs_tin.h | 118 drivers/scsi/bfa/include/defs/bfa_defs_tsensor.h | 43 drivers/scsi/bfa/include/defs/bfa_defs_types.h | 30 drivers/scsi/bfa/include/defs/bfa_defs_version.h | 22 drivers/scsi/bfa/include/defs/bfa_defs_vf.h | 74 drivers/scsi/bfa/include/defs/bfa_defs_vport.h | 91 drivers/scsi/bfa/include/fcb/bfa_fcb.h | 33 drivers/scsi/bfa/include/fcb/bfa_fcb_fcpim.h | 76 drivers/scsi/bfa/include/fcb/bfa_fcb_port.h | 113 drivers/scsi/bfa/include/fcb/bfa_fcb_rport.h | 80 drivers/scsi/bfa/include/fcb/bfa_fcb_vf.h | 47 drivers/scsi/bfa/include/fcb/bfa_fcb_vport.h | 47 drivers/scsi/bfa/include/fcs/bfa_fcs.h | 73 drivers/scsi/bfa/include/fcs/bfa_fcs_auth.h | 82 drivers/scsi/bfa/include/fcs/bfa_fcs_fabric.h | 112 drivers/scsi/bfa/include/fcs/bfa_fcs_fcpim.h | 131 drivers/scsi/bfa/include/fcs/bfa_fcs_fdmi.h | 63 drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h | 226 + drivers/scsi/bfa/include/fcs/bfa_fcs_rport.h | 104 drivers/scsi/bfa/include/fcs/bfa_fcs_vport.h | 63 drivers/scsi/bfa/include/log/bfa_log_fcs.h | 28 drivers/scsi/bfa/include/log/bfa_log_hal.h | 30 drivers/scsi/bfa/include/log/bfa_log_linux.h | 44 drivers/scsi/bfa/include/log/bfa_log_wdrv.h | 36 drivers/scsi/bfa/include/protocol/ct.h | 492 +++ drivers/scsi/bfa/include/protocol/fc.h | 1105 ++++++ drivers/scsi/bfa/include/protocol/fc_sp.h | 224 + drivers/scsi/bfa/include/protocol/fcp.h | 186 + drivers/scsi/bfa/include/protocol/fdmi.h | 163 + drivers/scsi/bfa/include/protocol/pcifw.h | 75 drivers/scsi/bfa/include/protocol/scsi.h | 1648 ++++++++++ drivers/scsi/bfa/include/protocol/types.h | 42 drivers/scsi/bfa/loop.c | 422 ++ drivers/scsi/bfa/lport_api.c | 291 + drivers/scsi/bfa/lport_priv.h | 82 drivers/scsi/bfa/ms.c | 759 ++++ drivers/scsi/bfa/n2n.c | 105 drivers/scsi/bfa/ns.c | 1243 +++++++ drivers/scsi/bfa/plog.c | 184 + drivers/scsi/bfa/rport.c | 2618 ++++++++++++++++ drivers/scsi/bfa/rport_api.c | 180 + drivers/scsi/bfa/rport_ftrs.c | 375 ++ drivers/scsi/bfa/scn.c | 482 ++ drivers/scsi/bfa/vfapi.c | 292 + drivers/scsi/bfa/vport.c | 891 +++++ drivers/scsi/bnx2i/bnx2i.h | 2 drivers/scsi/bnx2i/bnx2i_hwi.c | 2 drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 drivers/scsi/cxgb3i/cxgb3i_iscsi.c | 2 drivers/scsi/device_handler/scsi_dh_rdac.c | 2 drivers/scsi/hptiop.c | 37 drivers/scsi/hptiop.h | 3 drivers/scsi/iscsi_tcp.c | 2 drivers/scsi/libiscsi.c | 6 drivers/scsi/lpfc/lpfc_scsi.c | 15 drivers/scsi/mpt2sas/Kconfig | 2 drivers/scsi/mpt2sas/mpi/mpi2.h | 103 drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h | 200 + drivers/scsi/mpt2sas/mpi/mpi2_history.txt | 334 ++ drivers/scsi/mpt2sas/mpi/mpi2_init.h | 18 drivers/scsi/mpt2sas/mpi/mpi2_ioc.h | 65 drivers/scsi/mpt2sas/mpi/mpi2_tool.h | 134 drivers/scsi/mpt2sas/mpt2sas_base.c | 446 +- drivers/scsi/mpt2sas/mpt2sas_base.h | 106 drivers/scsi/mpt2sas/mpt2sas_config.c | 22 drivers/scsi/mpt2sas/mpt2sas_ctl.c | 61 drivers/scsi/mpt2sas/mpt2sas_ctl.h | 2 drivers/scsi/mpt2sas/mpt2sas_debug.h | 2 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 568 ++- drivers/scsi/mpt2sas/mpt2sas_transport.c | 26 drivers/scsi/mvsas/mv_defs.h | 4 drivers/scsi/mvsas/mv_init.c | 4 drivers/scsi/pmcraid.c | 58 drivers/scsi/qla2xxx/qla_mid.c | 6 drivers/scsi/scsi.c | 11 drivers/scsi/scsi_debug.c | 139 drivers/scsi/scsi_error.c | 3 drivers/scsi/scsi_transport_fc.c | 2 drivers/scsi/sd.c | 140 drivers/scsi/sd.h | 9 drivers/scsi/sd_dif.c | 65 drivers/scsi/sg.c | 10 drivers/scsi/sr.c | 22 drivers/scsi/st.c | 3 include/scsi/libiscsi.h | 3 include/scsi/scsi.h | 3 include/scsi/scsi_cmnd.h | 4 include/scsi/scsi_host.h | 15 259 files changed, 58442 insertions(+), 666 deletions(-)
And if I exclude the two new drivers, the total becomes:
52 files changed, 2147 insertions(+), 666 deletions(-)
The diff excluding the new drivers is attached.
James
---
Documentation/scsi/hptiop.txt +20 -1
@@ -3,6 +3,25 @@ HIGHPOINT ROCKETRAID 3xxx/4xxx ADAPTER DRIVER (hptiop) Controller Register Map ------------------------- +For RR44xx Intel IOP based adapters, the controller IOP is accessed via PCI BAR0 and BAR2: + + BAR0 offset Register + 0x11C5C Link Interface IRQ Set + 0x11C60 Link Interface IRQ Clear + + BAR2 offset Register + 0x10 Inbound Message Register 0 + 0x14 Inbound Message Register 1 + 0x18 Outbound Message Register 0 + 0x1C Outbound Message Register 1 + 0x20 Inbound Doorbell Register + 0x24 Inbound Interrupt Status Register + 0x28 Inbound Interrupt Mask Register + 0x30 Outbound Interrupt Status Register + 0x34 Outbound Interrupt Mask Register + 0x40 Inbound Queue Port + 0x44 Outbound Queue Port + For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0: BAR0 offset Register
@@ -93,7 +112,7 @@ The driver exposes following sysfs attributes: ----------------------------------------------------------------------------- -Copyright (C) 2006-2007 HighPoint Technologies, Inc. All Rights Reserved. +Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
drivers/infiniband/ulp/iser/iscsi_iser.c +1 -1
@@ -426,7 +426,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,* because we preallocate so many resources */ cls_session =iscsi_session_setup (&iscsi_iser_transport, shost, -ISCSI_DEF_XMIT_CMDS_MAX , +ISCSI_DEF_XMIT_CMDS_MAX ,0 ,sizeof (struct iscsi_iser_task ), initial_cmdsn,0 );if (!cls_session)
drivers/s390/scsi/zfcp_aux.c +20 -13
@@ -80,28 +80,35 @@ int zfcp_reqlist_isempty(struct zfcp_adapter *adapter)static void __init zfcp_init_device_configure (char *busid,u64 wwpn,u64 lun) { +struct ccw_device *ccwdev;struct zfcp_adapter *adapter;struct zfcp_port *port;struct zfcp_unit *unit; -mutex_lock (&zfcp_data.config_mutex); -read_lock_irq (&zfcp_data.config_lock); - adapter =zfcp_get_adapter_by_busid (busid); -if (adapter) -zfcp_adapter_get (adapter); -read_unlock_irq (&zfcp_data.config_lock); + ccwdev =get_ccwdev_by_busid (&zfcp_ccw_driver, busid); +if (!ccwdev) +return ; + +if (ccw_device_set_online (ccwdev)) + goto out_ccwdev; +mutex_lock (&zfcp_data.config_mutex); + adapter =dev_get_drvdata (&ccwdev->dev);if (!adapter) - goto out_adapter; - port =zfcp_port_enqueue (adapter, wwpn,0 ,0 ); -if (IS_ERR (port)) + goto out_unlock; +zfcp_adapter_get (adapter); + + port =zfcp_get_port_by_wwpn (adapter, wwpn); +if (!port) goto out_port; + +zfcp_port_get (port); unit =zfcp_unit_enqueue (port, lun);if (IS_ERR (unit)) goto out_unit;mutex_unlock (&zfcp_data.config_mutex); -ccw_device_set_online (adapter->ccw_device); +zfcp_erp_unit_reopen (unit,0 ,"auidc_1" ,NULL );zfcp_erp_wait (adapter);flush_work (&unit->scsi_work);
@@ -111,8 +118,10 @@ out_unit:zfcp_port_put (port); out_port:zfcp_adapter_put (adapter); -out_adapter: +out_unlock:mutex_unlock (&zfcp_data.config_mutex); +out_ccwdev: +put_device (&ccwdev->dev);return ; }
@@ -593,10 +602,8 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter)int retval =0 ;unsigned long flags; -cancel_work_sync (&adapter->scan_work);cancel_work_sync (&adapter->stat_work);zfcp_fc_wka_ports_force_offline (adapter->gs); -zfcp_adapter_scsi_unregister (adapter);sysfs_remove_group (&adapter->ccw_device->dev.kobj, &zfcp_sysfs_adapter_attrs);dev_set_drvdata (&adapter->ccw_device->dev,NULL );
drivers/s390/scsi/zfcp_ccw.c +14 -26
@@ -102,6 +102,14 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) adapter =dev_get_drvdata (&ccw_device->dev);if (!adapter) goto out; +mutex_unlock (&zfcp_data.config_mutex); + +cancel_work_sync (&adapter->scan_work); + +mutex_lock (&zfcp_data.config_mutex); + +/* this also removes the scsi devices, so call it first */ +zfcp_adapter_scsi_unregister (adapter);write_lock_irq (&zfcp_data.config_lock);list_for_each_entry_safe (port, p, &adapter->port_list_head, list) {
@@ -117,11 +125,8 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device)write_unlock_irq (&zfcp_data.config_lock);list_for_each_entry_safe (port, p, &port_remove_lh, list) { -list_for_each_entry_safe (unit, u, &unit_remove_lh, list) { -if (unit->device) -scsi_remove_device (unit->device); +list_for_each_entry_safe (unit, u, &unit_remove_lh, list)zfcp_unit_dequeue (unit); - }zfcp_port_dequeue (port); }wait_event (adapter->remove_wq,atomic_read (&adapter->refcount) ==0 );
@@ -192,13 +197,9 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device)mutex_lock (&zfcp_data.config_mutex); adapter =dev_get_drvdata (&ccw_device->dev); -if (!adapter) - goto out; -zfcp_erp_adapter_shutdown (adapter,0 ,"ccsoff1" ,NULL );zfcp_erp_wait (adapter);mutex_unlock (&zfcp_data.config_mutex); -out:return 0 ; }
@@ -253,13 +254,17 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev)mutex_lock (&zfcp_data.config_mutex); adapter =dev_get_drvdata (&cdev->dev); +if (!adapter) + goto out; +zfcp_erp_adapter_shutdown (adapter,0 ,"ccshut1" ,NULL );zfcp_erp_wait (adapter);zfcp_erp_thread_kill (adapter); +out:mutex_unlock (&zfcp_data.config_mutex); } -static struct ccw_driver zfcp_ccw_driver = { +struct ccw_driver zfcp_ccw_driver = { .owner =THIS_MODULE , .name ="zfcp" , .ids = zfcp_ccw_device_id,
@@ -284,20 +289,3 @@ int __init zfcp_ccw_register(void) {return ccw_driver_register (&zfcp_ccw_driver); } - -/** -* zfcp_get_adapter_by_busid - find zfcp_adapter struct -* @busid: bus id string of zfcp adapter to find -*/ -struct zfcp_adapter *zfcp_get_adapter_by_busid (char *busid) -{ -struct ccw_device *ccw_device; -struct zfcp_adapter *adapter =NULL ; - - ccw_device =get_ccwdev_by_busid (&zfcp_ccw_driver, busid); -if (ccw_device) { - adapter =dev_get_drvdata (&ccw_device->dev); -put_device (&ccw_device->dev); - } -return adapter; -}
drivers/s390/scsi/zfcp_cfdc.c +16 -1
@@ -86,8 +86,23 @@ static int zfcp_cfdc_copy_to_user(void __user *user_buffer,static struct zfcp_adapter *zfcp_cfdc_get_adapter (u32 devno) {char busid[9 ]; +struct ccw_device *ccwdev; +struct zfcp_adapter *adapter =NULL ; +snprintf (busid,sizeof (busid),"0.0.%04x" , devno); -return zfcp_get_adapter_by_busid (busid); + ccwdev =get_ccwdev_by_busid (&zfcp_ccw_driver, busid); +if (!ccwdev) + goto out; + + adapter =dev_get_drvdata (&ccwdev->dev); +if (!adapter) + goto out_put; + +zfcp_adapter_get (adapter); +out_put: +put_device (&ccwdev->dev); +out: +return adapter; }static int zfcp_cfdc_set_fsf (struct zfcp_fsf_cfdc *fsf_cfdc,int command)
drivers/s390/scsi/zfcp_ext.h +1 -1
@@ -28,7 +28,7 @@ extern int zfcp_sg_setup_table(struct scatterlist *, int);/* zfcp_ccw.c */ extern int zfcp_ccw_register (void );extern int zfcp_ccw_priv_sch (struct zfcp_adapter *); -extern struct zfcp_adapter *zfcp_get_adapter_by_busid (char *); +extern struct ccw_driver zfcp_ccw_driver;/* zfcp_cfdc.c */ extern struct miscdevice zfcp_cfdc_misc;
drivers/s390/scsi/zfcp_fsf.c +18 -4
@@ -1058,11 +1058,25 @@ static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req, bytes =zfcp_qdio_sbals_from_sg (adapter->qdio, &req->queue_req,SBAL_FLAGS0_TYPE_WRITE_READ , sg_resp, max_sbals); + req->qtcb->bottom.support.resp_buf_length = bytes;if (bytes <=0 )return -EIO ; +return 0 ; +} + +static int zfcp_fsf_setup_ct_els (struct zfcp_fsf_req *req, +struct scatterlist *sg_req, +struct scatterlist *sg_resp, +int max_sbals) +{ +int ret; + + ret =zfcp_fsf_setup_ct_els_sbals (req, sg_req, sg_resp, max_sbals); +if (ret) +return ret; +/* common settings for ct/gs and els requests */ - req->qtcb->bottom.support.resp_buf_length = bytes; req->qtcb->bottom.support.service_class =FSF_CLASS_3 ; req->qtcb->bottom.support.timeout =2 *R_A_TOV ;zfcp_fsf_start_timer (req,2 *R_A_TOV +10 );
@@ -1094,8 +1108,8 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool) } req->status |=ZFCP_STATUS_FSFREQ_CLEANUP ; - ret =zfcp_fsf_setup_ct_els_sbals (req, ct->req, ct->resp, -FSF_MAX_SBALS_PER_REQ ); + ret =zfcp_fsf_setup_ct_els (req, ct->req, ct->resp, +FSF_MAX_SBALS_PER_REQ );if (ret) goto failed_send;
@@ -1192,7 +1206,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) } req->status |=ZFCP_STATUS_FSFREQ_CLEANUP ; - ret =zfcp_fsf_setup_ct_els_sbals (req, els->req, els->resp,2 ); + ret =zfcp_fsf_setup_ct_els (req, els->req, els->resp,2 );if (ret) goto failed_send;
drivers/scsi/Kconfig +11 -0
@@ -366,6 +366,7 @@ config ISCSI_TCP source "drivers/scsi/cxgb3i/Kconfig" source "drivers/scsi/bnx2i/Kconfig" +source "drivers/scsi/be2iscsi/Kconfig" config SGIWD93_SCSI tristate "SGI WD93C93 SCSI Driver"
@@ -1827,6 +1828,16 @@ config SCSI_SRP To compile this driver as a module, choose M here: the module will be called libsrp. +config SCSI_BFA_FC + tristate "Brocade BFA Fibre Channel Support" + depends on PCI && SCSI + select SCSI_FC_ATTRS + help + This bfa driver supports all Brocade PCIe FC/FCOE host adapters. + + To compile this driver as a module, choose M here. The module will + be called bfa. + endif # SCSI_LOWLEVEL source "drivers/scsi/pcmcia/Kconfig"
drivers/scsi/Makefile +2 -0
@@ -86,6 +86,7 @@ obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx/ obj-$(CONFIG_SCSI_QLA_ISCSI) += qla4xxx/ obj-$(CONFIG_SCSI_LPFC) += lpfc/ +obj-$(CONFIG_SCSI_BFA_FC) += bfa/ obj-$(CONFIG_SCSI_PAS16) += pas16.o obj-$(CONFIG_SCSI_T128) += t128.o obj-$(CONFIG_SCSI_DMX3191D) += dmx3191d.o
@@ -130,6 +131,7 @@ obj-$(CONFIG_SCSI_MVSAS) += mvsas/ obj-$(CONFIG_PS3_ROM) += ps3rom.o obj-$(CONFIG_SCSI_CXGB3_ISCSI) += libiscsi.o libiscsi_tcp.o cxgb3i/ obj-$(CONFIG_SCSI_BNX2_ISCSI) += libiscsi.o bnx2i/ +obj-$(CONFIG_BE2ISCSI) += libiscsi.o be2iscsi/ obj-$(CONFIG_SCSI_PMCRAID) += pmcraid.o obj-$(CONFIG_ARM) += arm/
drivers/scsi/bnx2i/bnx2i.h +2 -0
@@ -100,6 +100,8 @@#define CTX_OFFSET 0x10000#define MAX_CID_CNT 0x4000 +#define BNX2I_570X_PAGE_SIZE_DEFAULT 4096 +/* 5709 context registers */ #define BNX2_MQ_CONFIG2 0x00003d00#define BNX2_MQ_CONFIG2_CONT_SZ (0x7L<<4)
drivers/scsi/bnx2i/bnx2i_hwi.c +1 -1
@@ -2386,7 +2386,7 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep) ctx_sz = (config2 &BNX2_MQ_CONFIG2_CONT_SZ ) >>3 ;if (ctx_sz) reg_off =CTX_OFFSET +MAX_CID_CNT *MB_KERNEL_CTX_SIZE - +PAGE_SIZE * + +BNX2I_570X_PAGE_SIZE_DEFAULT * (((cid_num - first_l4l5) / ctx_sz) +256 );else reg_off =CTX_OFFSET + (MB_KERNEL_CTX_SIZE * cid_num);
drivers/scsi/bnx2i/bnx2i_iscsi.c +1 -1
@@ -1243,7 +1243,7 @@ bnx2i_session_create(struct iscsi_endpoint *ep, cmds_max =BNX2I_SQ_WQES_MIN ; cls_session =iscsi_session_setup (&bnx2i_iscsi_transport, shost, - cmds_max,sizeof (struct bnx2i_cmd ), + cmds_max,0 ,sizeof (struct bnx2i_cmd ), initial_cmdsn,ISCSI_MAX_TARGET );if (!cls_session)return NULL ;
drivers/scsi/cxgb3i/cxgb3i_iscsi.c +1 -1
@@ -422,7 +422,7 @@ cxgb3i_session_create(struct iscsi_endpoint *ep, u16 cmds_max, u16 qdepth,BUG_ON (hba !=iscsi_host_priv (shost)); cls_session =iscsi_session_setup (&cxgb3i_iscsi_transport, shost, - cmds_max, + cmds_max,0 ,sizeof (struct iscsi_tcp_task ) +sizeof (struct cxgb3i_task_data ), initial_cmdsn,ISCSI_MAX_TARGET );
drivers/scsi/device_handler/scsi_dh_rdac.c +0 -2
@@ -500,8 +500,6 @@ static int mode_select_handle_sense(struct scsi_device *sdev,if (!ret) goto done; - err =SCSI_DH_OK ; -switch (sense_hdr.sense_key) {case NO_SENSE :case ABORTED_COMMAND :
drivers/scsi/hptiop.c +26 -11
@@ -1,6 +1,6 @@/* * HighPoint RR3xxx/4xxx controller driver for Linux -* Copyright (C) 2006-2007 HighPoint Technologies, Inc. All Rights Reserved. +* Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ MODULE_DESCRIPTION("HighPoint RocketRAID 3xxx/4xxx Controller Driver");static char driver_name[] ="hptiop" ;static const char driver_name_long[] ="RocketRAID 3xxx/4xxx Controller driver" ; -static const char driver_ver[] ="v1.3 (071203)" ; +static const char driver_ver[] ="v1.6 (090910)" ;static int iop_send_sync_msg (struct hptiop_hba *hba,u32 msg,u32 millisec); static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
@@ -115,9 +115,13 @@ static void hptiop_drain_outbound_queue_itl(struct hptiop_hba *hba)static int iop_intr_itl (struct hptiop_hba *hba) {struct hpt_iopmu_itl __iomem *iop = hba->u.itl.iop; +void __iomem *plx = hba->u.itl.plx;u32 status;int ret =0 ; +if (plx &&readl (plx +0x11C5C ) &0xf ) +writel (1 , plx +0x11C60 ); + status =readl (&iop->outbound_intstatus);if (status &IOPMU_OUTBOUND_INT_MSG0 ) {
@@ -460,15 +464,25 @@ static void __iomem *hptiop_map_pci_bar(struct hptiop_hba *hba, int index)static int hptiop_map_pci_bar_itl (struct hptiop_hba *hba) { +struct pci_dev *pcidev = hba->pcidev; hba->u.itl.iop =hptiop_map_pci_bar (hba,0 ); -if (hba->u.itl.iop) -return 0 ; -else +if (hba->u.itl.iop ==NULL )return -1 ; +if ((pcidev->device &0xff00 ) ==0x4400 ) { + hba->u.itl.plx = hba->u.itl.iop; + hba->u.itl.iop =hptiop_map_pci_bar (hba,2 ); +if (hba->u.itl.iop ==NULL ) { +iounmap (hba->u.itl.plx); +return -1 ; + } + } +return 0 ; }static void hptiop_unmap_pci_bar_itl (struct hptiop_hba *hba) { +if (hba->u.itl.plx) +iounmap (hba->u.itl.plx);iounmap (hba->u.itl.iop); }
@@ -1239,22 +1253,23 @@ static struct hptiop_adapter_ops hptiop_mv_ops = {static struct pci_device_id hptiop_id_table[] = { {PCI_VDEVICE (TTI ,0x3220 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3320 ), (kernel_ulong_t)&hptiop_itl_ops }, - {PCI_VDEVICE (TTI ,0x3520 ), (kernel_ulong_t)&hptiop_itl_ops }, - {PCI_VDEVICE (TTI ,0x4320 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x3410 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3510 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3511 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x3520 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3521 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3522 ), (kernel_ulong_t)&hptiop_itl_ops }, - {PCI_VDEVICE (TTI ,0x3410 ), (kernel_ulong_t)&hptiop_itl_ops }, - {PCI_VDEVICE (TTI ,0x3540 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3530 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x3540 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3560 ), (kernel_ulong_t)&hptiop_itl_ops }, - {PCI_VDEVICE (TTI ,0x4322 ), (kernel_ulong_t)&hptiop_itl_ops }, - {PCI_VDEVICE (TTI ,0x4321 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x4210 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x4211 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x4310 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x4311 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x4320 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x4321 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x4322 ), (kernel_ulong_t)&hptiop_itl_ops }, + {PCI_VDEVICE (TTI ,0x4400 ), (kernel_ulong_t)&hptiop_itl_ops }, {PCI_VDEVICE (TTI ,0x3120 ), (kernel_ulong_t)&hptiop_mv_ops }, {PCI_VDEVICE (TTI ,0x3122 ), (kernel_ulong_t)&hptiop_mv_ops }, {PCI_VDEVICE (TTI ,0x3020 ), (kernel_ulong_t)&hptiop_mv_ops },
drivers/scsi/hptiop.h +2 -1
@@ -1,6 +1,6 @@/* * HighPoint RR3xxx/4xxx controller driver for Linux -* Copyright (C) 2006-2007 HighPoint Technologies, Inc. All Rights Reserved. +* Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -228,6 +228,7 @@ struct hptiop_hba {union {struct {struct hpt_iopmu_itl __iomem *iop; +void __iomem *plx; } itl;struct {struct hpt_iopmv_regs *regs;
drivers/scsi/iscsi_tcp.c +1 -1
@@ -811,7 +811,7 @@ iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, goto free_host; cls_session =iscsi_session_setup (&iscsi_sw_tcp_transport, shost, - cmds_max, + cmds_max,0 ,sizeof (struct iscsi_tcp_task ) +sizeof (struct iscsi_sw_tcp_hdrbuf ), initial_cmdsn,0 );
drivers/scsi/libiscsi.c +4 -2
@@ -2436,7 +2436,7 @@ static void iscsi_host_dec_session_cnt(struct Scsi_Host *shost)*/ struct iscsi_cls_session *iscsi_session_setup (struct iscsi_transport *iscsit,struct Scsi_Host *shost, -uint16_t cmds_max,int cmd_task_size, +uint16_t cmds_max,int dd_size,int cmd_task_size,uint32_t initial_cmdsn,unsigned int id) {struct iscsi_host *ihost =shost_priv (shost);
@@ -2486,7 +2486,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, scsi_cmds = total_cmds -ISCSI_MGMT_CMDS_MAX ; cls_session =iscsi_alloc_session (shost, iscsit, -sizeof (struct iscsi_session )); +sizeof (struct iscsi_session ) + + dd_size);if (!cls_session) goto dec_session_count; session = cls_session->dd_data;
@@ -2503,6 +2504,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, session->max_cmdsn = initial_cmdsn +1 ; session->max_r2t =1 ; session->tt = iscsit; + session->dd_data = cls_session->dd_data +sizeof (*session);mutex_init (&session->eh_mutex);spin_lock_init (&session->lock);
drivers/scsi/lpfc/lpfc_scsi.c +3 -12
@@ -56,8 +56,6 @@ static char *dif_op_str[] = {"SCSI_PROT_WRITE_INSERT" ,"SCSI_PROT_READ_PASS" , "SCSI_PROT_WRITE_PASS", -"SCSI_PROT_READ_CONVERT" , - "SCSI_PROT_WRITE_CONVERT" };static void lpfc_release_scsi_buf_s4 (struct lpfc_hba *phba,struct lpfc_scsi_buf *psb);
@@ -1131,13 +1129,11 @@ lpfc_sc_to_sli_prof(struct scsi_cmnd *sc) ret_prof =LPFC_PROF_A1 ;break ; -case SCSI_PROT_READ_CONVERT : -case SCSI_PROT_WRITE_CONVERT : +case SCSI_PROT_READ_PASS : +case SCSI_PROT_WRITE_PASS : ret_prof =LPFC_PROF_AST1 ;break ; -case SCSI_PROT_READ_PASS : -case SCSI_PROT_WRITE_PASS :case SCSI_PROT_NORMAL :default : printk(KERN_ERR "Bad op/guard:%d/%d combination\n",
@@ -1157,8 +1153,6 @@ lpfc_sc_to_sli_prof(struct scsi_cmnd *sc) ret_prof =LPFC_PROF_C1 ;break ; -case SCSI_PROT_READ_CONVERT : -case SCSI_PROT_WRITE_CONVERT :case SCSI_PROT_READ_INSERT :case SCSI_PROT_WRITE_STRIP :case SCSI_PROT_NORMAL :
@@ -1209,8 +1203,7 @@ lpfc_get_cmd_dif_parms(struct scsi_cmnd *sc, uint16_t *apptagmask,static int cnt;if (protcnt && (op ==SCSI_PROT_WRITE_STRIP || - op ==SCSI_PROT_WRITE_PASS || - op ==SCSI_PROT_WRITE_CONVERT )) { + op ==SCSI_PROT_WRITE_PASS )) { cnt++; spt = page_address(sg_page(scsi_prot_sglist(sc))) +
@@ -1501,8 +1494,6 @@ lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc)case SCSI_PROT_WRITE_STRIP :case SCSI_PROT_READ_PASS :case SCSI_PROT_WRITE_PASS : -case SCSI_PROT_WRITE_CONVERT : -case SCSI_PROT_READ_CONVERT : ret =LPFC_PG_TYPE_DIF_BUF ;break ;default :
drivers/scsi/mpt2sas/Kconfig +1 -1
@@ -2,7 +2,7 @@ # Kernel configuration file for the MPT2SAS # # This code is based on drivers/scsi/mpt2sas/Kconfig -# Copyright (C) 2007-2008 LSI Corporation +# Copyright (C) 2007-2009 LSI Corporation # (mailto:[email protected]) # This program is free software; you can redistribute it and/or
drivers/scsi/mpt2sas/mpi/mpi2.h +73 -30
224 lines not on this page · raw message
drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h +198 -2
239 lines not on this page · raw message
drivers/scsi/mpt2sas/mpi/mpi2_history.txt new file +334 -0
334 lines not on this page · raw message
drivers/scsi/mpt2sas/mpi/mpi2_init.h +15 -3
@@ -1,12 +1,12 @@/* -* Copyright (c) 2000-2008 LSI Corporation. +* Copyright (c) 2000-2009 LSI Corporation. * * * Name: mpi2_init.h * Title: MPI SCSI initiator mode messages and structures * Creation Date: June 23, 2006 * -* mpi2_init.h Version: 02.00.06 +* mpi2_init.h Version: 02.00.07 * * Version History * ---------------
@@ -23,6 +23,10 @@* Control field Task Attribute flags. * Moved LUN field defines to mpi2.h becasue they are * common to many structures. +* 05-06-09 02.00.07 Changed task management type of Query Unit Attention to +* Query Asynchronous Event. +* Defined two new bits in the SlotStatus field of the SCSI +* Enclosure Processor Request and Reply. * -------------------------------------------------------------------------- */
@@ -289,7 +293,11 @@ typedef struct _MPI2_SCSI_TASK_MANAGE_REQUEST#define MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07)#define MPI2_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08)#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_TASK_SET (0x09) -#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_UNIT_ATTENTION (0x0A) +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_ASYNC_EVENT (0x0A) + +/* obsolete TaskType name */ +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_UNIT_ATTENTION \ + (MPI2_SCSITASKMGMT_TASKTYPE_QRY_ASYNC_EVENT)/* MsgFlags bits */
@@ -375,6 +383,8 @@ typedef struct _MPI2_SEP_REQUEST#define MPI2_SEP_REQ_SLOTSTATUS_HOT_SPARE (0x00000100)#define MPI2_SEP_REQ_SLOTSTATUS_UNCONFIGURED (0x00000080)#define MPI2_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT (0x00000040) +#define MPI2_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010) +#define MPI2_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)#define MPI2_SEP_REQ_SLOTSTATUS_DEV_REBUILDING (0x00000004)#define MPI2_SEP_REQ_SLOTSTATUS_DEV_FAULTY (0x00000002)#define MPI2_SEP_REQ_SLOTSTATUS_NO_ERROR (0x00000001)
@@ -410,6 +420,8 @@ typedef struct _MPI2_SEP_REPLY#define MPI2_SEP_REPLY_SLOTSTATUS_HOT_SPARE (0x00000100)#define MPI2_SEP_REPLY_SLOTSTATUS_UNCONFIGURED (0x00000080)#define MPI2_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT (0x00000040) +#define MPI2_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010) +#define MPI2_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)#define MPI2_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING (0x00000004)#define MPI2_SEP_REPLY_SLOTSTATUS_DEV_FAULTY (0x00000002)#define MPI2_SEP_REPLY_SLOTSTATUS_NO_ERROR (0x00000001)
drivers/scsi/mpt2sas/mpi/mpi2_ioc.h +53 -12
101 lines not on this page · raw message
drivers/scsi/mpt2sas/mpi/mpi2_tool.h +132 -2
169 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_base.c +316 -130
915 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_base.h +86 -20
228 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_config.c +14 -8
@@ -2,7 +2,7 @@* This module provides common API for accessing firmware configuration pages * * This code is based on drivers/scsi/mpt2sas/mpt2_base.c -* Copyright (C) 2007-2008 LSI Corporation +* Copyright (C) 2007-2009 LSI Corporation * (mailto:[email protected]) * * This program is free software; you can redistribute it and/or
@@ -227,23 +227,25 @@ _config_free_config_dma_memory(struct MPT2SAS_ADAPTER *ioc,* mpt2sas_config_done - config page completion routine * @ioc: per adapter object * @smid: system request message index -* @VF_ID: virtual function id +* @msix_index: MSIX table index supplied by the OS * @reply: reply message frame(lower 32bit addr) * Context: none. * * The callback handler when using _config_request. * -* Return nothing. +* Return 1 meaning mf should be freed from _base_interrupt +* 0 means the mf is freed from this function. */ -void -mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply) +u8 +mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index, +u32 reply) {MPI2DefaultReply_t *mpi_reply;if (ioc->config_cmds.status ==MPT2_CMD_NOT_USED ) -return ; +return 1 ;if (ioc->config_cmds.smid != smid) -return ; +return 1 ; ioc->config_cmds.status |=MPT2_CMD_COMPLETE ; mpi_reply =mpt2sas_base_get_reply_virt_addr (ioc, reply);if (mpi_reply) {
@@ -257,6 +259,7 @@ mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply)#endif ioc->config_cmds.smid =USHORT_MAX ;complete (&ioc->config_cmds.done); +return 1 ; }/**
@@ -303,6 +306,9 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t retry_count =0 ;memset (&mem,0 ,sizeof (struct config_request )); + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; +if (config_page) { mpi_request->Header.PageVersion = mpi_reply->Header.PageVersion; mpi_request->Header.PageNumber = mpi_reply->Header.PageNumber;
@@ -380,7 +386,7 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t_config_display_some_debug (ioc, smid,"config_request" ,NULL );#endif init_completion (&ioc->config_cmds.done); -mpt2sas_base_put_smid_default (ioc, smid, config_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->config_cmds.done, timeout*HZ );if (!(ioc->config_cmds.status &MPT2_CMD_COMPLETE )) {
drivers/scsi/mpt2sas/mpt2sas_ctl.c +39 -22
151 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_scsih.c +401 -167
568 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_transport.c +17 -9
Lines of this file are not shown. View the raw message.
drivers/scsi/pmcraid.c +31 -27
58 lines not on this page · raw message
drivers/scsi/scsi_debug.c +116 -23
139 lines not on this page · raw message
drivers/scsi/sd.c +111 -29
140 lines not on this page · raw message
drivers/scsi/sd_dif.c +0 -65
65 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 3 lines · James Bottomley
This is mostly fixes. However, it contains two new drivers: Brocade SAS (bfa), the Bladengine2 iSCSI (be2iscsi) under the merge window exemption
Btw, I'm getting less excited about the merge window exemption.
It makes sense for consumer devices that people actually hit and that are needed for bringup (ie they make a difference between a system that can be installed and used, and one that cannot), but I'm not at all sure it makes sense for things like this.
The _reason_ for the driver exemption was the fact that even a broken driver is better than no driver at all for somebody who just can't get a working system without it, but that argument really goes away when the driver is so specialized that it's not about regular hardware any more.
And the whole "driver exemption" seems to have become a by-word for "I can ignore the merge window for 50% of my code". Which makes me very tired of it if there aren't real advantages to real users.
So I'm seriously considering a "the driver has to be mass market and also actually matter to an install" rule for the exemption to be valid.
Linus
Quoted 13 lines · Linus Torvalds
Quoted 3 lines · James Bottomley
This is mostly fixes. However, it contains two new drivers: Brocade SAS (bfa), the Bladengine2 iSCSI (be2iscsi) under the merge window exemption
Btw, I'm getting less excited about the merge window exemption.
It makes sense for consumer devices that people actually hit and that are needed for bringup (ie they make a difference between a system that can be installed and used, and one that cannot), but I'm not at all sure it makes sense for things like this.
Quoted 4 lines
The _reason_ for the driver exemption was the fact that even a broken driver is better than no driver at all for somebody who just can't get a working system without it, but that argument really goes away when the driver is so specialized that it's not about regular hardware any more.
OK, so I don't see a huge distinction here. This is a driver for a piece of enterprise HW that Linux previously didn't support. To someone cursing not being able to use there hardware, it's every bit as important as the latest wireless driver.
Quoted 3 lines
And the whole "driver exemption" seems to have become a by-word for "I can ignore the merge window for 50% of my code". Which makes me very tired of it if there aren't real advantages to real users.
While the exemption exists, I can certainly ignore the merge window for new drivers, yes ... however, that's not 50% of the code submitted in the merge window, and it's one time ... the same driver follows the merge window for the next release. I try to police this pretty rigidly in SCSI ... as you do at the top.
In fact, for SCSI, these two drivers are the third and fourth merge window exemptions in our year long history of allowing this.
Quoted 2 lines
So I'm seriously considering a "the driver has to be mass market and also actually matter to an install" rule for the exemption to be valid.
OK, so on the policy, let me argue against the above. One of the things we've been saying about linux is that we facilitate rapid adoption of new hardware (and that we support more hardware than any other OS). The Merge window exemption was adopted at the kernel summit last year specifically to speed our adoption of new hardware. I think it's valuable for this speed of adoption to be *all* hardware, not specifically mass market laptop type stuff.
However, even if you want to change the definition, can we please not do it retroactively?
Thanks,
James
Quoted 28 lines · On Tue, 06 Oct 2009 20:54:02 +0000 James Bottomley wrote:
Quoted 13 lines · Linus Torvalds
Quoted 3 lines · James Bottomley
This is mostly fixes. However, it contains two new drivers: Brocade SAS (bfa), the Bladengine2 iSCSI (be2iscsi) under the merge window exemption
Btw, I'm getting less excited about the merge window exemption.
It makes sense for consumer devices that people actually hit and that are needed for bringup (ie they make a difference between a system that can be installed and used, and one that cannot), but I'm not at all sure it makes sense for things like this.
Quoted 4 lines
The _reason_ for the driver exemption was the fact that even a broken driver is better than no driver at all for somebody who just can't get a working system without it, but that argument really goes away when the driver is so specialized that it's not about regular hardware any more.
OK, so I don't see a huge distinction here. This is a driver for a piece of enterprise HW that Linux previously didn't support. To someone cursing not being able to use there hardware, it's every bit as important as the latest wireless driver.
Quoted 3 lines
And the whole "driver exemption" seems to have become a by-word for "I can ignore the merge window for 50% of my code". Which makes me very tired of it if there aren't real advantages to real users.
Quoted 5 lines
While the exemption exists, I can certainly ignore the merge window for new drivers, yes ... however, that's not 50% of the code submitted in the merge window, and it's one time ... the same driver follows the merge window for the next release. I try to police this pretty rigidly in SCSI ... as you do at the top.
polices it so rigidly that even simple kernel-doc patches sit in a scsi git tree for months. :(
---
~Randy
Quoted 48 lines · James Bottomley
Quoted 13 lines · Linus Torvalds
Quoted 3 lines · James Bottomley
This is mostly fixes. However, it contains two new drivers: Brocade SAS (bfa), the Bladengine2 iSCSI (be2iscsi) under the merge window exemption
Btw, I'm getting less excited about the merge window exemption.
It makes sense for consumer devices that people actually hit and that are needed for bringup (ie they make a difference between a system that can be installed and used, and one that cannot), but I'm not at all sure it makes sense for things like this.
Quoted 4 lines
The _reason_ for the driver exemption was the fact that even a broken driver is better than no driver at all for somebody who just can't get a working system without it, but that argument really goes away when the driver is so specialized that it's not about regular hardware any more.
OK, so I don't see a huge distinction here. This is a driver for a piece of enterprise HW that Linux previously didn't support. To someone cursing not being able to use there hardware, it's every bit as important as the latest wireless driver.
Quoted 3 lines
And the whole "driver exemption" seems to have become a by-word for "I can ignore the merge window for 50% of my code". Which makes me very tired of it if there aren't real advantages to real users.
While the exemption exists, I can certainly ignore the merge window for new drivers, yes ... however, that's not 50% of the code submitted in the merge window, and it's one time ... the same driver follows the merge window for the next release. I try to police this pretty rigidly in SCSI ... as you do at the top.
In fact, for SCSI, these two drivers are the third and fourth merge window exemptions in our year long history of allowing this.
Quoted 2 lines
So I'm seriously considering a "the driver has to be mass market and also actually matter to an install" rule for the exemption to be valid.
OK, so on the policy, let me argue against the above. One of the things we've been saying about linux is that we facilitate rapid adoption of new hardware (and that we support more hardware than any other OS). The Merge window exemption was adopted at the kernel summit last year specifically to speed our adoption of new hardware. I think it's valuable for this speed of adoption to be *all* hardware, not specifically mass market laptop type stuff.
Quoted 2 lines
However, even if you want to change the definition, can we please not do it retroactively?
So what do you want to do about this? I need the fixes in this tree to go forwards even if you don't want the new drivers ... I also now have a list of other fixes to put in the next round which I'd like to get into linux-next but while this is unresolved I can't really add more stuff to my rc-fixes tree.
James
Quoted 2 lines · James Bottomley
So what do you want to do about this?
I'm taking it (and the parisc one I was also unhappy with), but I'm a bit grumpy as usual. The parisc pull came totally outside the merge window, and the SCSI fix pull is technically perfectly fine, but what makes me grumpy is that I get the strong feeling that people aren't even _trying_ to hit the merge window with new drivers, because they decide that they instead can just push them any time.
So I don't think I necessarily want to change the "new driver" policy per se, but I want people to see the merge window as the _primary_ time you get any new code in. The "yes, we'll take new drivers" thing should be the exception rather than the rule. It doesn't seem to be an exception.
Linus
Quoted 2 lines · Linus Torvalds
I'm taking it (and the parisc one I was also unhappy with)
Actually, looking at it again, I'm wavering.
That BFA driver isn't a "driver". It's a huge subsystem of it's own. It's almost 50 _thousand_ lines of code for just a single "driver", and for rare hardware at that.
Quite frankly, the "bang per line" is almost zero.
What the ^&@* is wrong with "enterprise SCSI" people? The amount of crazy is overwhelming.
So I've pulled it, but I'm still considering just unpulling it. That driver is _not_ "just a driver". It's something more. Something dank and smelly, that has grown in dark and forbidding places.
The whole crazy "high end SCSI" industry needs a f*cking exorcism.
Even if I don't unpull, I don't _ever_ want to see a driver like this outside the merge window. And dammit, James, you should have realized that.
Linus
Quoted 11 lines · Linus Torvalds
Quoted 2 lines · James Bottomley
So what do you want to do about this?
I'm taking it (and the parisc one I was also unhappy with), but I'm a bit grumpy as usual. The parisc pull came totally outside the merge window, and the SCSI fix pull is technically perfectly fine, but what makes me grumpy is that I get the strong feeling that people aren't even _trying_ to hit the merge window with new drivers, because they decide that they instead can just push them any time.
OK, so we still have a bit of a mismatch here. I *do* tell people who come to SCSI with new drivers that for the *first* submission they don't need to worry about the merge window because of the new driver exception. This allows us to clean them up ready for going in without the submitter feeling huge pressure to hit the merge window rather than concentrating on code quality and what we need to make a technically correct submission.
I think this is the correct thing to do for new drivers (which often come with new writers) because training people to hit the merge window is often long an painful (when I say not yet to their important driver enhancements) ... starting people off with the carrot is better than the stick.
Quoted 4 lines
So I don't think I necessarily want to change the "new driver" policy per se, but I want people to see the merge window as the _primary_ time you get any new code in. The "yes, we'll take new drivers" thing should be the exception rather than the rule. It doesn't seem to be an exception.
Like I said, this will be my fourth new driver under the exception in the whole year it's been going. On the other hand, I do have pm8001 still going ... it just got resubmitted after another round of fixes. If it's ready for the next rc submissions round, it will be my fifth ...
James
Quoted 10 lines · Linus Torvalds
Quoted 2 lines · Linus Torvalds
I'm taking it (and the parisc one I was also unhappy with)
Actually, looking at it again, I'm wavering.
That BFA driver isn't a "driver". It's a huge subsystem of it's own. It's almost 50 _thousand_ lines of code for just a single "driver", and for rare hardware at that.
It's a huge glue layer driver, like the aic7xxx, yes.
So the tradeoff here is that I estimate it would take years to get it to where a linux driver should be.
Could I remind you that at the last kernel summit I was the one advocating for holding drivers out of tree until they met our standards and you were the one who told me not to do this ... Jon even captured it:
https://lwn.net/Articles/298570/
I'll certainly offer this driver to Greg's drivers project to see if they can unglue it ... I just think it's going to take a while.
Quoted 9 lines
Quite frankly, the "bang per line" is almost zero.
What the ^&@* is wrong with "enterprise SCSI" people? The amount of crazy is overwhelming.
So I've pulled it, but I'm still considering just unpulling it. That driver is _not_ "just a driver". It's something more. Something dank and smelly, that has grown in dark and forbidding places.
Quoted 5 lines
The whole crazy "high end SCSI" industry needs a f*cking exorcism.
Even if I don't unpull, I don't _ever_ want to see a driver like this outside the merge window. And dammit, James, you should have realized that.
Well certainly in an ideal world ... and in fact the world before KS2008 I wouldn't have accepted it until it was well cleaned up.
James
Quoted 5 lines · James Bottomley
Could I remind you that at the last kernel summit I was the one advocating for holding drivers out of tree until they met our standards and you were the one who told me not to do this ... Jon even captured it:
What the hell is wrong with you?
You're bringing up total red herrings that have nothing to do with anything.
My point is:
- that's not just another driver. That's FIFTY THOUSANDS LINES OF LARGELY INFRASTRUCTURE CRAP.
- I'm not arguing that we shouldn't merge the driver
- I'm arguing that you damn well should have used the merge window for something like this!
What part of "it's already -rc3, and you're pushing 50kloc of crap that almost nobody will care about" can you not understand?
What part of "merge window" do you have issues with?
What part of "sure, I'll take new drivers after the merge window, but COME &*^@ ON!" do you have trouble understanding?
Stop bringing up totally irrelevant crap.
Linus
Quoted 3 lines · Linus Torvalds
What part of "sure, I'll take new drivers after the merge window, but COME &*^@ ON!" do you have trouble understanding?
Put another way: look at the drivers/staging tree. Look at when it gets merged. Do this:
git diff --stat v2.6.31-rc1..v2.6.31 drivers/staging/
and then do this:
git diff --stat v2.6.30..v2.6.31-rc1 drivers/staging/
adn thing about the fact that they are _all_ "new drivers". Then consider the issue of "merge window" vs "not merge window".
It really boils down to the fact that I'm perfectly happy to let new drivers slip in after the merge window in order to help end users. But really - there has to be a limit to it. Not just anything.
It has to help end users, and dammit, you have to admit that 50 kloc is damn well not just "another random driver".
Linus
Quoted 18 lines · Linus Torvalds
Quoted 5 lines · James Bottomley
Could I remind you that at the last kernel summit I was the one advocating for holding drivers out of tree until they met our standards and you were the one who told me not to do this ... Jon even captured it:
What the hell is wrong with you?
You're bringing up total red herrings that have nothing to do with anything.
My point is:
- that's not just another driver. That's FIFTY THOUSANDS LINES OF LARGELY INFRASTRUCTURE CRAP.- I'm not arguing that we shouldn't merge the driver
Quoted 7 lines
- I'm arguing that you damn well should have used the merge window for something like this!
What part of "it's already -rc3, and you're pushing 50kloc of crap that almost nobody will care about" can you not understand?
What part of "merge window" do you have issues with?
OK, you're saying the merge window exemption should only apply to drivers which meet our coding standards.
That's fine, I can live with that ... and that's how we'll operate in future.
Quoted 2 lines
What part of "sure, I'll take new drivers after the merge window, but COME &*^@ ON!" do you have trouble understanding?
What does the ^@ mean again?
Quoted 1 line
Stop bringing up totally irrelevant crap.
James
Quoted 3 lines · James Bottomley
OK, you're saying the merge window exemption should only apply to drivers which meet our coding standards.
Well, to me, it's not even "coding standards". It's more about "letting things slide so that users get their hands on things earlier, since it can't really regress". Coding standards are obviously a part of that, but I think the coding standard question should come into this mainly in the sense of "should it go through staging or not" kind of sense, not in the timing sense.
The reason I object to this driver at this point is that I really think there's a _huge_ difference between some random average driver, and a 50 kloc monster driver that basically seems to implement its own protocol.
Most random new drivers tend to be a few hundred lines of code, in some cases a few thousand. They don't generally bring in their own subsystem code, they often just hook into existing things like the libata layer or the network driver infrastructure etc.
So most drivers are in a totally different class than the one I'm objecting to in the SCSI tree.
And I also really do think there is a huge difference between some specialized high-end SCSI driver that is only relevant to enterprise people and some more average driver that is expected to perhaps exist in lots of consumer devices. How many people does it affect, and what's their ability to handle it?
Another way of putting that "consumer" vs "enterprise" thing: how big is the _upside_ of merging the driver outside fo the merge window? Again, I simply think pure number of potential users matters for the "should we let it slide" question.
Linus
Quoted 7 lines · Linus Torvalds
It really boils down to the fact that I'm perfectly happy to let new drivers slip in after the merge window in order to help end users. But really - there has to be a limit to it. Not just anything.
It has to help end users, and dammit, you have to admit that 50 kloc is damn well not just "another random driver".
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window? Crap is crap, no matter when it is merged. In this particular case, the crap is its own subsystem, and wouldn't interfere with the rest of the kernel tree. So it's no more risky to merge it outside of merge window; so the decision about whether merge 50 kloc of crap shouldn't be impacted about whether we are in our out of the merge window.
Arguably, the question is whether it's better for the end users to merge this at _any_ time, or whether we force the manufacturer to drop it into the staging tree provisionally until it can be cleaned up.
- Ted
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Linus
Quoted 15 lines · Linus Torvalds
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
Quoted 4 lines
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Greg, what's your take on the quality of this new driver? Do you have some time to do a review of this with drivers/staging/ versus drivers/ glasses on? The Git URI is at:
master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 master
To me, after a very quick skimming of it it's borderline. The driver looks like proper Linux code at first sight in places, but i can see _lots_ of (as in thousands of) odd bits - at least odd for a newly submitted driver:
- 200+ instances of bfa_boolean_t, which is defined via:
enum bfa_boolean {
BFA_FALSE = 0,
BFA_TRUE = 1
};
#define bfa_boolean_t enum bfa_booleanthat should be bool simply.
- the driver is full with misaligned vertical spacing like:
struct bfa_pcidev_s {
int pci_slot;
u8 pci_func;
u16 device_id;
bfa_os_addr_t pci_bar_kva;
};voidbfa_timer_beat(struct bfa_timer_mod_s *mod)
{
struct list_head *qh = &mod->timer_q;
struct list_head *qe, *qe_next;
struct bfa_timer_s *elem;
struct list_head timedout_q;which suggests that this driver was treated with a de-ugly-ifying sed job without a human looking at the result. There's over a thousand (!) of such instances in the driver.
- various forms of avoidable whitespace damage: for example 873 instances of 'space' character followed by 'tab'.
- bfa_timer.c looks weird - implements a naive timeout mechanism on top of real timers? Why not use real timers in to begin with?
- Also, the .h files are layed out oddly. Bits of them are in include/*, bits of them in *.h.
- the 90+ easily avoidable stylistic details attached below in drivers/scsi/bfa/fcbuild.c.
- accesses to cmnd->host_scribble both seem an ancient method, and are also somewhat SMP-barrier-unclean. (i'm sure it works and is correct in practice as there are heavy, serializing functions around those places, but the casts still look ugly and there are no barriers.)
- The 290+ instances of bfa_assert() uses should probably be BUG_ON()s or WARN_ON()s instead of a wrapped panic. Nothing ever defines BFA_PERF_BUILD so the wrapping seems removable.
havent looked further and these are all easily addressed by just looking at the code and doing fixes that dont impact the resulting .o - so very easy to do en masse.
I dont know what's the current mainline inclusion quality threshold for non-staging Linux drivers - it might be ok. Also, the driver commit has been rebased a few days ago which makes it hard to see its stability track record.
Ingo
--------------->
ERROR: return is not a function, parentheses are not required #191: FILE: fcbuild.c:191:
+ return (FC_PARSE_BUSY);
ERROR: return is not a function, parentheses are not required #193: FILE: fcbuild.c:193:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #196: FILE: fcbuild.c:196:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #198: FILE: fcbuild.c:198:
+ return (FC_PARSE_OK);
CHECK: multiple assignments should be avoided
#226: FILE: fcbuild.c:226:
+ plogi->csp.rxsz = plogi->class3.rxsz = bfa_os_htons(pdu_size);
ERROR: return is not a function, parentheses are not required #231: FILE: fcbuild.c:231:
+ return (sizeof(struct fc_logi_s));
CHECK: multiple assignments should be avoided
#248: FILE: fcbuild.c:248:
+ flogi->csp.rxsz = flogi->class3.rxsz = bfa_os_htons(pdu_size);
ERROR: return is not a function, parentheses are not required #270: FILE: fcbuild.c:270:
+ return (sizeof(struct fc_logi_s));
CHECK: multiple assignments should be avoided
#284: FILE: fcbuild.c:284:
+ flogi->csp.rxsz = flogi->class3.rxsz = bfa_os_htons(pdu_size);
ERROR: return is not a function, parentheses are not required #290: FILE: fcbuild.c:290:
+ return (sizeof(struct fc_logi_s));
CHECK: multiple assignments should be avoided
#305: FILE: fcbuild.c:305:
+ flogi->csp.rxsz = flogi->class3.rxsz = bfa_os_htons(pdu_size);
ERROR: return is not a function, parentheses are not required #309: FILE: fcbuild.c:309:
+ return (sizeof(struct fc_logi_s));
ERROR: return is not a function, parentheses are not required #341: FILE: fcbuild.c:341:
+ return (FC_PARSE_BUSY);
ERROR: return is not a function, parentheses are not required #343: FILE: fcbuild.c:343:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #347: FILE: fcbuild.c:347:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #350: FILE: fcbuild.c:350:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #353: FILE: fcbuild.c:353:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #356: FILE: fcbuild.c:356:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #358: FILE: fcbuild.c:358:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #360: FILE: fcbuild.c:360:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #375: FILE: fcbuild.c:375:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #396: FILE: fcbuild.c:396:
+ return (sizeof(struct fc_prli_s));
ERROR: return is not a function, parentheses are not required #417: FILE: fcbuild.c:417:
+ return (sizeof(struct fc_prli_s));
ERROR: return is not a function, parentheses are not required #424: FILE: fcbuild.c:424:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #427: FILE: fcbuild.c:427:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #431: FILE: fcbuild.c:431:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #434: FILE: fcbuild.c:434:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #436: FILE: fcbuild.c:436:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #443: FILE: fcbuild.c:443:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #446: FILE: fcbuild.c:446:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #449: FILE: fcbuild.c:449:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #451: FILE: fcbuild.c:451:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #465: FILE: fcbuild.c:465:
+ return (sizeof(struct fc_logo_s));
ERROR: return is not a function, parentheses are not required #487: FILE: fcbuild.c:487:
+ return (sizeof(struct fc_adisc_s));
ERROR: return is not a function, parentheses are not required #514: FILE: fcbuild.c:514:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #517: FILE: fcbuild.c:517:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #520: FILE: fcbuild.c:520:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #522: FILE: fcbuild.c:522:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #532: FILE: fcbuild.c:532:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #537: FILE: fcbuild.c:537:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #539: FILE: fcbuild.c:539:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #553: FILE: fcbuild.c:553:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #556: FILE: fcbuild.c:556:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #559: FILE: fcbuild.c:559:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #573: FILE: fcbuild.c:573:
+ return (sizeof(struct fchs_s));
ERROR: return is not a function, parentheses are not required #581: FILE: fcbuild.c:581:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #583: FILE: fcbuild.c:583:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #600: FILE: fcbuild.c:600:
+ return (sizeof(struct fc_rrq_s));
ERROR: return is not a function, parentheses are not required #614: FILE: fcbuild.c:614:
+ return (sizeof(struct fc_els_cmd_s));
ERROR: return is not a function, parentheses are not required #630: FILE: fcbuild.c:630:
+ return (sizeof(struct fc_ls_rjt_s));
ERROR: return is not a function, parentheses are not required #646: FILE: fcbuild.c:646:
+ return (sizeof(struct fc_ba_acc_s));
ERROR: return is not a function, parentheses are not required #657: FILE: fcbuild.c:657:
+ return (sizeof(struct fc_els_cmd_s));
ERROR: return is not a function, parentheses are not required #699: FILE: fcbuild.c:699:
+ return (bfa_os_ntohs(tprlo_acc->payload_len));
ERROR: return is not a function, parentheses are not required #724: FILE: fcbuild.c:724:
+ return (bfa_os_ntohs(prlo_acc->payload_len));
ERROR: return is not a function, parentheses are not required #738: FILE: fcbuild.c:738:
+ return (sizeof(struct fc_rnid_cmd_s));
ERROR: return is not a function, parentheses are not required #762: FILE: fcbuild.c:762:
+ return (sizeof(struct fc_rnid_acc_s));
ERROR: return is not a function, parentheses are not required #764: FILE: fcbuild.c:764:
+ return (sizeof(struct fc_rnid_acc_s) -
ERROR: return is not a function, parentheses are not required #779: FILE: fcbuild.c:779:
+ return (sizeof(struct fc_rpsc_cmd_s));
ERROR: return is not a function, parentheses are not required #800: FILE: fcbuild.c:800:
+ return (sizeof(struct fc_rpsc2_cmd_s) + ((npids - 1) *
ERROR: return is not a function, parentheses are not required #822: FILE: fcbuild.c:822:
+ return (sizeof(struct fc_rpsc_acc_s));
CHECK: multiple assignments should be avoided
#855: FILE: fcbuild.c:855:
+ pdisc->csp.rxsz = pdisc->class3.rxsz = bfa_os_htons(pdu_size);
ERROR: return is not a function, parentheses are not required #859: FILE: fcbuild.c:859:
+ return (sizeof(struct fc_logi_s));
ERROR: return is not a function, parentheses are not required #868: FILE: fcbuild.c:868:
+ return (FC_PARSE_LEN_INVAL);
ERROR: return is not a function, parentheses are not required #871: FILE: fcbuild.c:871:
+ return (FC_PARSE_ACC_INVAL);
ERROR: return is not a function, parentheses are not required #874: FILE: fcbuild.c:874:
+ return (FC_PARSE_PWWN_NOT_EQUAL);
ERROR: return is not a function, parentheses are not required #877: FILE: fcbuild.c:877:
+ return (FC_PARSE_NWWN_NOT_EQUAL);
ERROR: return is not a function, parentheses are not required #880: FILE: fcbuild.c:880:
+ return (FC_PARSE_RXSZ_INVAL);
ERROR: return is not a function, parentheses are not required #882: FILE: fcbuild.c:882:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #906: FILE: fcbuild.c:906:
+ return (bfa_os_ntohs(prlo->payload_len));
ERROR: return is not a function, parentheses are not required #919: FILE: fcbuild.c:919:
+ return (FC_PARSE_FAILURE);
ERROR: return is not a function, parentheses are not required #939: FILE: fcbuild.c:939:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #971: FILE: fcbuild.c:971:
+ return (bfa_os_ntohs(tprlo->payload_len));
ERROR: return is not a function, parentheses are not required #984: FILE: fcbuild.c:984:
+ return (FC_PARSE_ACC_INVAL);
ERROR: return is not a function, parentheses are not required #990: FILE: fcbuild.c:990:
+ return (FC_PARSE_NOT_FCP);
ERROR: return is not a function, parentheses are not required #992: FILE: fcbuild.c:992:
+ return (FC_PARSE_OPAFLAG_INVAL);
ERROR: return is not a function, parentheses are not required #994: FILE: fcbuild.c:994:
+ return (FC_PARSE_RPAFLAG_INVAL);
ERROR: return is not a function, parentheses are not required #996: FILE: fcbuild.c:996:
+ return (FC_PARSE_OPA_INVAL);
ERROR: return is not a function, parentheses are not required #998: FILE: fcbuild.c:998:
+ return (FC_PARSE_RPA_INVAL);
ERROR: return is not a function, parentheses are not required #1000: FILE: fcbuild.c:1000:
+ return (FC_PARSE_OK);
ERROR: return is not a function, parentheses are not required #1027: FILE: fcbuild.c:1027:
+ return (sizeof(struct fc_ba_rjt_s));
ERROR: return is not a function, parentheses are not required #1076: FILE: fcbuild.c:1076:
+ return (sizeof(struct fcgs_gidpn_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1093: FILE: fcbuild.c:1093:
+ return (sizeof(fcgs_gpnid_req_t) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1110: FILE: fcbuild.c:1110:
+ return (sizeof(fcgs_gnnid_req_t) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1140: FILE: fcbuild.c:1140:
+ return (sizeof(struct fc_scr_s));
ERROR: return is not a function, parentheses are not required #1160: FILE: fcbuild.c:1160:
+ return (sizeof(struct fc_rscn_pl_s));
ERROR: return is not a function, parentheses are not required #1191: FILE: fcbuild.c:1191:
+ return (sizeof(struct fcgs_rftid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1213: FILE: fcbuild.c:1213:
+ return (sizeof(struct fcgs_rftid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1234: FILE: fcbuild.c:1234:
+ return (sizeof(struct fcgs_rffid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1256: FILE: fcbuild.c:1256:
+ return (sizeof(struct fcgs_rspnid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1278: FILE: fcbuild.c:1278:
+ return (sizeof(struct fcgs_gidft_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1297: FILE: fcbuild.c:1297:
+ return (sizeof(struct fcgs_rpnid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1316: FILE: fcbuild.c:1316:
+ return (sizeof(struct fcgs_rnnid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1335: FILE: fcbuild.c:1335:
+ return (sizeof(struct fcgs_rcsid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1354: FILE: fcbuild.c:1354:
+ return (sizeof(struct fcgs_rptid_req_s) + sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1371: FILE: fcbuild.c:1371:
+ return (sizeof(struct ct_hdr_s) + sizeof(struct fcgs_ganxt_req_s));
ERROR: return is not a function, parentheses are not required #1388: FILE: fcbuild.c:1388:
+ return (sizeof(struct ct_hdr_s));
ERROR: return is not a function, parentheses are not required #1428: FILE: fcbuild.c:1428:
+ return (sizeof(struct ct_hdr_s) + sizeof(fcgs_gmal_req_t));
ERROR: return is not a function, parentheses are not required #1448: FILE: fcbuild.c:1448:
+ return (sizeof(struct ct_hdr_s) + sizeof(fcgs_gfn_req_t));
total: 93 errors, 0 warnings, 5 checks, 1449 lines checked
fcbuild.c has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
Review
Quoted 12 lines · Ingo Molnar
I dont know what's the current mainline inclusion quality threshold for non-staging Linux drivers - it might be ok. Also, the driver commit has been rebased a few days ago which makes it hard to see its stability track record.
Ingo
--------------->
ERROR: return is not a function, parentheses are not required #191: FILE: fcbuild.c:191:(quoted diff) +1
-0+ return (FC_PARSE_BUSY);
The author submitted a basic style clean up here,
http://patchwork.kernel.org/patch/50161/
It was a series that did the whole driver.. I'm not sure why those patches aren't included, but at least there was an attempt at cleaning the driver up..
Daniel
Quoted 17 lines · Ingo Molnar
Quoted 15 lines · Linus Torvalds
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
Quoted 8 lines
Quoted 4 lines
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Greg, what's your take on the quality of this new driver? Do you have some time to do a review of this with
drivers/staging/versusdrivers/glasses on? The Git URI is at:
To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used). It's an ABI issue. If we would have to change the user visible ABI while the driver was being cleaned up, I'd want it in staging to warn users to expect these problems. Although we couldn't clean up everything, I did make sure this driver plugs correctly into the standard linux FC ABI before putting it in the SCSI tree, so there are no ABI changes anticipated even though there will likely be a lot of code changes. Therefore, the correct clean up path for this one is through the SCSI tree.
James
Quoted 23 lines · James Bottomley
Quoted 22 lines · Ingo Molnar
Quoted 19 lines · Linus Torvalds
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Quoted 7 lines
Quoted 3 lines
Greg, what's your take on the quality of this new driver? Do you have some time to do a review of this with
drivers/staging/versusdrivers/glasses on? The Git URI is at:To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used).
Great, I'll be glad to take them :)
Quoted 8 lines
It's an ABI issue. If we would have to change the user visible ABI while the driver was being cleaned up, I'd want it in staging to warn users to expect these problems. Although we couldn't clean up everything, I did make sure this driver plugs correctly into the standard linux FC ABI before putting it in the SCSI tree, so there are no ABI changes anticipated even though there will likely be a lot of code changes. Therefore, the correct clean up path for this one is through the SCSI tree.
Ok, that's your call as the scsi maintainer.
If you need anything to go into staging as an incentive to get the code cleaned up, or if not, dropped, just send it to me.
thanks,
greg k-h
Quoted 13 lines · Linus Torvalds
Quoted 3 lines · James Bottomley
OK, you're saying the merge window exemption should only apply to drivers which meet our coding standards.
Well, to me, it's not even "coding standards". It's more about "letting things slide so that users get their hands on things earlier, since it can't really regress". Coding standards are obviously a part of that, but I think the coding standard question should come into this mainly in the sense of "should it go through staging or not" kind of sense, not in the timing sense.
Quoted 3 lines
The reason I object to this driver at this point is that I really think there's a _huge_ difference between some random average driver, and a 50 kloc monster driver that basically seems to implement its own protocol.
The protocol it's implementing is a Fibre Channel state engine (it is a FC driver, after all). We have an embryonic project in SCSI to do this:
libfc. libfc was separated from the fcoe project when we thought it might prove useful. However, it isn't quite production ready yet, but I do have agreement that the bca driver will move to it in the near future.
Just for comparison with other enterprise FC drivers:
qla2xxx: 30k LOC
lpfc: 58k LOC
so it's not even our biggest FC driver.
The other reason for the big state engine is that this isn't a fat firmware (everything done inside the firmware of the card) type driver. We like thin firmware hardware because it's easier to fix when things go wrong.
If you give the perception of penalising drivers for being "huge" you're sending the message to hardware manufacturers that they'll have an easier time of it if they simply shove all the nasty bits into firmware and present the kernel community with a tiny driver for a bloated fat firmware card.
Quoted 4 lines
Most random new drivers tend to be a few hundred lines of code, in some cases a few thousand. They don't generally bring in their own subsystem code, they often just hook into existing things like the libata layer or the network driver infrastructure etc.
Right, and in this case, it will eventually plug into libfc ... we just haven't quite got the infrastructure ready yet.
The functional infrastructure we need it to plug into for the userspace
ABI: scsi_transport_fc is all there and working.
Quoted 8 lines
So most drivers are in a totally different class than the one I'm objecting to in the SCSI tree.
And I also really do think there is a huge difference between some specialized high-end SCSI driver that is only relevant to enterprise people and some more average driver that is expected to perhaps exist in lots of consumer devices. How many people does it affect, and what's their ability to handle it?
Actually, larger than you would think. Our primary customer at distributions is the enterprise. Now, you may say that enterprise distro users aren't at the bleeding edge of kernel development. However, we use the club of not being backported to a distro until you're upstream to try and force driver writers/hardware vendors to engage with the community. The carrot to them is that as soon as they make it upstream, the distros will incorporate the driver. This makes the merge window exemption an important part of that carrot, since otherwise they might find themselves on the wrong side of a three month cycle.
Quoted 4 lines
Another way of putting that "consumer" vs "enterprise" thing: how big is the _upside_ of merging the driver outside fo the merge window? Again, I simply think pure number of potential users matters for the "should we let it slide" question.
The upside is that I can use this as an inducement to other driver writers for good behaviour, plus the bfa driver can get picked up by the enterprise distributions early. To people engaged in convincing hardware vendors to work upstream and release early and often, that's a very big upside.
James
Quoted 23 lines · James Bottomley
Quoted 22 lines · Ingo Molnar
Quoted 19 lines · Linus Torvalds
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Quoted 7 lines
Quoted 3 lines
Greg, what's your take on the quality of this new driver? Do you have some time to do a review of this with
drivers/staging/versusdrivers/glasses on? The Git URI is at:To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used). [...]
I think you need to update your notion of what goes into drivers/staging/ - these days it's primarily about code/implementation quality (Greg please correct me if i'm wrong about that).
Driver ABIs are distinctly down the priority list.
Quoted 8 lines
[...] It's an ABI issue. If we would have to change the user visible ABI while the driver was being cleaned up, I'd want it in staging to warn users to expect these problems. Although we couldn't clean up everything, I did make sure this driver plugs correctly into the standard linux FC ABI before putting it in the SCSI tree, so there are no ABI changes anticipated even though there will likely be a lot of code changes. Therefore, the correct clean up path for this one is through the SCSI tree.
What kind of significant ABI does this driver expose? If this question even comes up then it's using the wrong kind of ABI i think. Drivers should almost never expose significant new ABIs.
If it's a storage management ABI then that should have been done at a higher level - possibly as a system call, but at minimum as a general facility.
(Anyway ... this cannot be argued without knowing what specific ABI you mean here.)
Ingo
Quoted 33 lines · Ingo Molnar
Quoted 23 lines · James Bottomley
Quoted 22 lines · Ingo Molnar
Quoted 19 lines · Linus Torvalds
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Quoted 7 lines
Quoted 3 lines
Greg, what's your take on the quality of this new driver? Do you have some time to do a review of this with
drivers/staging/versusdrivers/glasses on? The Git URI is at:To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used). [...]
Quoted 5 lines
I think you need to update your notion of what goes into
drivers/staging/- these days it's primarily about code/implementation quality (Greg please correct me if i'm wrong about that).Driver ABIs are distinctly down the priority list.
Not for me they're not. We worked hard to unify exposed ABIs for drivers, so this is the most important user visible feature. We can clean up code in the drivers tree, that's easy. We can't break the user visible ABI of a supported driver without causing a lot of pain to its user community.
Quoted 9 lines
Quoted 8 lines
[...] It's an ABI issue. If we would have to change the user visible ABI while the driver was being cleaned up, I'd want it in staging to warn users to expect these problems. Although we couldn't clean up everything, I did make sure this driver plugs correctly into the standard linux FC ABI before putting it in the SCSI tree, so there are no ABI changes anticipated even though there will likely be a lot of code changes. Therefore, the correct clean up path for this one is through the SCSI tree.
Quoted 3 lines
What kind of significant ABI does this driver expose? If this question even comes up then it's using the wrong kind of ABI i think. Drivers should almost never expose significant new ABIs.
The answer was in the email fragment you quoted: none on its own. It plugs into the standard FC transport ABI now.
However, there are various storage bodies who see creating user ABIs as part of their job. The way these tend to get implemented is in the driver because that's the way it was done in UNIX (each driver rolls its own). Part of my job is going through drivers and taking them out again ... while ensuring we at least have a way to perform whatever task it was in a uniform manner for all drivers.
Quoted 3 lines
If it's a storage management ABI then that should have been done at a higher level - possibly as a system call, but at minimum as a general facility.
It is: it's implemented in the FC transport class, where it's uniform for all FC drivers.
James
Quoted 4 lines
(Anyway ... this cannot be argued without knowing what specific ABI you mean here.)
Ingo
Quoted 30 lines · Ingo Molnar
Quoted 27 lines · James Bottomley
Quoted 25 lines · Ingo Molnar
Quoted 15 lines · Linus Torvalds
Quoted 3 lines · Theodore Tso
So would it be acceptable to merge the 50 kloc of crap _during_ the merge window?
Yes. I actually looked at the driver (since I had pulled it - I've unpulled it but am still mulling it over), and while I think it looked huge and overly complex, it by no means gave me the kinds of vibes I get from some "obviously-ported-from-windows-with-no-clue" drivers.
So at least from my quick look I didn't get the feeling that the driver was "evil". For me, it's a timing issue. I hate getting big pull requests after -rc1 is out, and I really don't like the feeling that people are just ignoring the merge window.
Quoted 4 lines
That said, if somebody wants to look more closely at the driver, and then wants to convince people that it should have gone through "staging", feel free. But that's not what I've personally been arguing about.
Greg, what's your take on the quality of this new driver? Do you have some time to do a review of this with
drivers/staging/versusdrivers/glasses on? The Git URI is at:
Quoted 7 lines
Quoted 3 lines
To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used). [...]
I think you need to update your notion of what goes into
drivers/staging/- these days it's primarily about code/implementation quality (Greg please correct me if i'm wrong about that).
No, so far that is the majority of why stuff is in staging, although userspace apis also do play a part here.
But I leave it up to the subsystem maintainer to do what they want to do, if they want to take coding style mistakes, well, it's their responsibility to maintain the crud :)
thanks,
greg k-h
Quoted 9 lines · James Bottomley
Quoted 9 lines
Quoted 3 lines
To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used). [...]
I think you need to update your notion of what goes into
drivers/staging/- these days it's primarily about code/implementation quality (Greg please correct me if i'm wrong about that).
Quoted 7 lines
Quoted 1 line
Driver ABIs are distinctly down the priority list.
Not for me they're not. We worked hard to unify exposed ABIs for drivers, so this is the most important user visible feature. We can clean up code in the drivers tree, that's easy. We can't break the user visible ABI of a supported driver without causing a lot of pain to its user community.
I think you are interpreting what should go into drivers/staging/ _very_ narrowly.
Basically if you skip the drivers/staging/ step for unclean drivers you _remove_ an incentive of driver authors to fix up crap. If it's upstream already without cleanups then why bother cleaning it up fully?
Staging should be for drivers that arent clean enough for mainline as-is (having a messy ABI can be one of the reasons that makes a driver unclean), but which are still important enough and have active maintainers/developers who care about them.
It's basically an optimistic multi-step trust algorithm for drivers whose lack would otherwise be a "cannot use upstream" showstopper for a significant class of Linux users - but which are not yet clean enough for upstream inclusion. The 4 steps of:
- out of tree
- in Greg's staging tree
- upstream in drivers/staging/
- upstream in drivers/
Offer various degrees of incentives and walking that path expresses it both to driver authors and to kernel maintainers that all parties involved can be trusted to produce clean code.
Everyone wins from that:
- users get faster hw-enablement
- driver authors get reinforcement that their stuff is moving forward (which they can communicate back to their employers)
- maintainers get patches that they can build trust upon and the danger of release-and-forget drivers is lessened.
- even if authors orphan a driver, actual real users have the ability to move things themselves.
- [ if none of that happens then sure the driver wasnt all that important to begin with and can be dropped - nobody loses. ]
I think your interpretation is arbitrary - where did you get that ABI rule from? I'm sure it cannot be from any of the drivers/staging/ discussions on lkml, i've followed them quite closely. If 'has a messy ABI' was the only requirement for drivers/staging/ then we could move 90% of drivers/staging/ into drivers/ straight away - and that would be counter-productive IMHO.
Sidenote, in fact i think we should expand on that: drivers/staging/ should be used in the _other_ direction as well - to un-upstream stale drivers that are abandoned and unused, in a gradual fashion. 'git mv' is cheap.
Basically, drivers/staging/ gives us an excellent opportunity to _increase_ the quality of drivers by applying stronger upstream inclusion filters, without having to hurt users/developers in the process. We just have to start using it that way as well.
Ingo
Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
adding David Miller and the wireless developers who had this idea as well...
Quoted 6 lines · Ingo Molnar
I think your interpretation is arbitrary - where did you get that ABI rule from? I'm sure it cannot be from any of the
drivers/staging/discussions on lkml, i've followed them quite closely. If 'has a messy ABI' was the only requirement fordrivers/staging/then we could move 90% ofdrivers/staging/intodrivers/straight away - and that would be counter-productive IMHO.
I agree with this, and the other points you raised that I snipped out.
Quoted 4 lines
Sidenote, in fact i think we should expand on that:
drivers/staging/should be used in the _other_ direction as well - to un-upstream stale drivers that are abandoned and unused, in a gradual fashion. 'git mv' is cheap.
Ok, this is about the 3rd or 4th time I've heard this, from totally different people lately. It seems that I'm the only one that has the ability to drop drivers out of the kernel tree, which is a funny situation :)
In thinking about this a lot more, I don't really mind it. If people want to push stuff out of "real" places in the kernel, into drivers/staging/ and give the original authors and maintainers notice about what is going on, _and_ provide a TODO file for what needs to happen to get the code back into the main portion of the kernel tree, then I'll be happy to help out with this and manage it.
I think a 6-9 month window (basically 3 kernel releases) should be sufficient time to have a driver that has been in drivers/staging/ be cleaned up enough to move back into the main kernel tree. If not, it could be easily dropped.
Any objections to this?
Quoted 4 lines
Basically,
drivers/staging/gives us an excellent opportunity to _increase_ the quality of drivers by applying stronger upstream inclusion filters, without having to hurt users/developers in the process. We just have to start using it that way as well.
I totally agree. And so far, it does seem to be working well for this. A number of companies have used it to successfully get their code into the main kernel, as well as driving them to clean up their code better to keep it from having to go into the staging tree.
thanks,
greg k-h
Quoted 13 lines · Ingo Molnar
Quoted 11 lines · James Bottomley
Quoted 10 lines
Quoted 3 lines
To me, the matter of staging versus actual tree isn't a quality issue (otherwise we'd be shifting ~75% of SCSI drivers to staging, depending on whose view of "quality" was being used). [...]
I think you need to update your notion of what goes into
drivers/staging/- these days it's primarily about code/implementation quality (Greg please correct me if i'm wrong about that).Driver ABIs are distinctly down the priority list.
Quoted 8 lines
Quoted 5 lines
Not for me they're not. We worked hard to unify exposed ABIs for drivers, so this is the most important user visible feature. We can clean up code in the drivers tree, that's easy. We can't break the user visible ABI of a supported driver without causing a lot of pain to its user community.
I think you are interpreting what should go into
drivers/staging/_very_ narrowly.
As it is my right to do.
Quoted 3 lines
Basically if you skip the
drivers/staging/step for unclean drivers you _remove_ an incentive of driver authors to fix up crap. If it's upstream already without cleanups then why bother cleaning it up fully?
There's cleanup and there's cleanup. Most of the remaining problems with the bfa driver won't be found by checkpatch and they're not obvious to a non-storage expert ... but also these aren't major; I just want it where I can see it to make sure forward progress is being made.
The major area of change for this driver is interfacing it to libfc ... that's not a staging tree function. Assuming we can make it work, this driver will become the first non fcoe consumer of libfc. Likely both libfc and this driver will have to change as we try this. Again, it's not something just anyone can do (in fact, I intend to leave it to the experts and just referee from the sidelines).
Quoted 26 lines
Staging should be for drivers that arent clean enough for mainline as-is (having a messy ABI can be one of the reasons that makes a driver unclean), but which are still important enough and have active maintainers/developers who care about them.
It's basically an optimistic multi-step trust algorithm for drivers whose lack would otherwise be a "cannot use upstream" showstopper for a significant class of Linux users - but which are not yet clean enough for upstream inclusion. The 4 steps of:
- out of tree
- in Greg's staging tree
- upstream indrivers/staging/
- upstream indrivers/Offer various degrees of incentives and walking that path expresses it both to driver authors and to kernel maintainers that all parties involved can be trusted to produce clean code.
Everyone wins from that:
- users get faster hw-enablement
- driver authors get reinforcement that their stuff is moving forward (which they can communicate back to their employers)
Quoted 8 lines
- maintainers get patches that they can build trust upon and the danger of release-and-forget drivers is lessened.
- even if authors orphan a driver, actual real users have the ability to move things themselves.
- [ if none of that happens then sure the driver wasnt all that important to begin with and can be dropped - nobody loses. ]
Well, the choir appreciates the sermon.
Quoted 6 lines
I think your interpretation is arbitrary - where did you get that ABI rule from? I'm sure it cannot be from any of the
drivers/staging/discussions on lkml, i've followed them quite closely. If 'has a messy ABI' was the only requirement fordrivers/staging/then we could move 90% ofdrivers/staging/intodrivers/straight away - and that would be counter-productive IMHO.
It's called making an external process serve my purposes. I'm not asking anyone else to do this. However, having a halfway house for incorrect ABI drivers is a useful additional function which we were lacking before.
Putting a driver that needs expert cleanup into someone else's tree seems counter productive to me because it's separating the community of experts from the driver updates. I mean, fine for whitespace stuff, and also fine if we actually have documentation; less so if only the authors understand the hardware and their patches need monitoring.
Having the SCSI tree update drivers/staging is an OK solution. However, at this stage, I don't think the bfa driver is bad enough to be tagged with the staging taint flag.
James
Quoted 11 lines
Sidenote, in fact i think we should expand on that:
drivers/staging/should be used in the _other_ direction as well - to un-upstream stale drivers that are abandoned and unused, in a gradual fashion. 'git mv' is cheap.Basically,
drivers/staging/gives us an excellent opportunity to _increase_ the quality of drivers by applying stronger upstream inclusion filters, without having to hurt users/developers in the process. We just have to start using it that way as well.Ingo
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Greg KHQuoted 7 lines · Greg KH
Quoted 4 lines
Sidenote, in fact i think we should expand on that:
drivers/staging/should be used in the _other_ direction as well - to un-upstream stale drivers that are abandoned and unused, in a gradual fashion. 'git mv' is cheap.Ok, this is about the 3rd or 4th time I've heard this, from totally different people lately. [...]
Heh. I guess i had a good crystal ball on that then - i raised that issue in my very first comments on drivers/staging/, 2.5 years ago - see the "Linux Kernel developer statement about closed source code" thread, where i wrote:
| - We must accept open-source drivers (which are license-compatible | with the kernel) for new hardware the moment they are offered. No | ifs and when. No whining about quality, style, security, re-use, | non-reuse, obsolete APIs, overlapping functionality, the already | busy merge schedule of a maintainer or whatever other thing can come | up on lkml. | | We can create arbitrary quarantine mechanisms we wish to use: | CONFIG_REALLY_BROKEN. We could even create drivers/staging/ as a | temporary staging area for drivers. | | What we cannot do is to _deny_ the distribution channel and exclude | users. The moment we do that (and we still do that in way too many | areas of the kernel) we have lost the availability race.
[...]
| If it's not maintained actively(sc) (i.e. it's a fire-and-forget | driver) then it can get marked BROKEN with time, and can get removed | as well.
Hm, i think i even gave drivers/staging/ its name?
Quoted 2 lines
[...] It seems that I'm the only one that has the ability to drop drivers out of the kernel tree, which is a funny situation :)
You are the only one who has the ability to send a warning shot towards drivers _without hurting users_, and by moving it into the focus of a team of cleanup oriented developers.
I think that's an important distinction ;-)
Quoted 7 lines
In thinking about this a lot more, I don't really mind it. If people want to push stuff out of "real" places in the kernel, into
drivers/staging/and give the original authors and maintainers notice about what is going on, _and_ provide a TODO file for what needs to happen to get the code back into the main portion of the kernel tree, then I'll be happy to help out with this and manage it.
Quoted 6 lines
I think a 6-9 month window (basically 3 kernel releases) should be sufficient time to have a driver that has been in
drivers/staging/be cleaned up enough to move back into the main kernel tree. If not, it could be easily dropped.Any objections to this?
Sounds excellent to me!
Quoted 9 lines
Quoted 4 lines
Basically,
drivers/staging/gives us an excellent opportunity to _increase_ the quality of drivers by applying stronger upstream inclusion filters, without having to hurt users/developers in the process. We just have to start using it that way as well.I totally agree. And so far, it does seem to be working well for this. A number of companies have used it to successfully get their code into the main kernel, as well as driving them to clean up their code better to keep it from having to go into the staging tree.
Yeah. I think we were hurting from an under-estimated trust problem:
driver authors couldnt trust _us maintainers_ to follow through with upstreaming. drivers/staging/ improved that IMHO.
I.e. the old process of upstreaming drivers was too arbitrary, incurred big latencies and was dependent on the whims of maintainers. I.e. new developers got exposed to some of the worst social aspects of a distributed development process.
Now there's basically a single (and friendly! ;-) upstreaming channel that people (yet-)unfamilar with Linux practices can standardize on. This reduces the pressure on maintainers and also creates a reference point for upstreaming honesty - which is almost unconditionally good i think.
Ingo
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Greg KHQuoted 30 lines · Greg KH
adding David Miller and the wireless developers who had this idea as well...
Quoted 6 lines · Ingo Molnar
I think your interpretation is arbitrary - where did you get that ABI rule from? I'm sure it cannot be from any of the
drivers/staging/discussions on lkml, i've followed them quite closely. If 'has a messy ABI' was the only requirement fordrivers/staging/then we could move 90% ofdrivers/staging/intodrivers/straight away - and that would be counter-productive IMHO.I agree with this, and the other points you raised that I snipped out.
Quoted 4 lines
Sidenote, in fact i think we should expand on that:
drivers/staging/should be used in the _other_ direction as well - to un-upstream stale drivers that are abandoned and unused, in a gradual fashion. 'git mv' is cheap.Ok, this is about the 3rd or 4th time I've heard this, from totally different people lately. It seems that I'm the only one that has the ability to drop drivers out of the kernel tree, which is a funny situation :)
In thinking about this a lot more, I don't really mind it. If people want to push stuff out of "real" places in the kernel, into
drivers/staging/and give the original authors and maintainers notice about what is going on, _and_ provide a TODO file for what needs to happen to get the code back into the main portion of the kernel tree, then I'll be happy to help out with this and manage it.
Quoted 6 lines
I think a 6-9 month window (basically 3 kernel releases) should be sufficient time to have a driver that has been in
drivers/staging/be cleaned up enough to move back into the main kernel tree. If not, it could be easily dropped.Any objections to this?
Not as an optional tool to use when necessary.
If you want to make this a mandatory path for old drivers, then, I think
it's far too rigid, yes. There's a huge amount of danger to changing
working drivers simply on grounds of code cleanup and that danger increases exponentially as they get older and the hardware gets rarer. Look at what happened to the initio driver in 2008 for instance. That was cleaned up by Alan Cox, no mean expert in the field, with the assistance of a tester with the actual card, so basically a textbook operation. However, a bug crept in during this process that wasn't spotted by the tester. When it was spotted (bug report ~6 months later) the original tester wasn't available and code inspection across the cleanup was very hard. Fortunately, the reporter was motivated to track down and patch the driver, so it worked out all right in the end, but a lot of bug reporters aren't so capable (or so motivated). Plus most clean up patches for old hardware tend only to be compile tested, so the potential for bugs is far greater.
James
Quoted 5 lines
Quoted 4 lines
Basically,
drivers/staging/gives us an excellent opportunity to _increase_ the quality of drivers by applying stronger upstream inclusion filters, without having to hurt users/developers in the process. We just have to start using it that way as well.
Quoted 8 lines
I totally agree. And so far, it does seem to be working well for this. A number of companies have used it to successfully get their code into the main kernel, as well as driving them to clean up their code better to keep it from having to go into the staging tree.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · James Bottomley
Quoted 3 lines
I think you are interpreting what should go into
drivers/staging/_very_ narrowly.As it is my right to do.
Umm, James, it cuts both ways.
Others can assert their interpretation, and quite frankly, yours is the odd one out. Everybody else agrees oevrwhelmingly that "staging" is about ugly and not-up-to-snuff drivers.
So you can talk about your 'right' to interpret things all you want, but what's the point? If others haev the same right (which presumably even you agree they do), then if people think a driver is ugly and needs to be in staging, what makes _your_ right so special?
As mentioned earlier, I don't personally care about this driver, but I do care about your behavior. You can't just ignore other people if they say that a driver is too damn ugly.
Linus
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Ingo MolnarQuoted 1 line · Ingo Molnar
Hm, i think i even gave
drivers/staging/its name?
Yes you did, and I appreciate it :)
Quoted 8 lines
Quoted 2 lines
[...] It seems that I'm the only one that has the ability to drop drivers out of the kernel tree, which is a funny situation :)
You are the only one who has the ability to send a warning shot towards drivers
_withouthurtingusers_, and by moving it into the focus of a team of cleanup oriented developers.I think that's an important distinction ;-)
Good point.
Quoted 7 lines
Quoted 7 lines
In thinking about this a lot more, I don't really mind it. If people want to push stuff out of "real" places in the kernel, into
drivers/staging/and give the original authors and maintainers notice about what is going on, _and_ provide a TODO file for what needs to happen to get the code back into the main portion of the kernel tree, then I'll be happy to help out with this and manage it.
Quoted 8 lines
Quoted 6 lines
I think a 6-9 month window (basically 3 kernel releases) should be sufficient time to have a driver that has been in
drivers/staging/be cleaned up enough to move back into the main kernel tree. If not, it could be easily dropped.Any objections to this?
Sounds excellent to me!
Great, I'll await the patches to move stuff to drivers/staging/ now.
Wireless developers, warm up your editors :)
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to James BottomleyQuoted 7 lines · James Bottomley
If you want to make this a mandatory path for old drivers, then, I think
it's far too rigid, yes. There's a huge amount of danger to changing
working drivers simply on grounds of code cleanup and that danger increases exponentially as they get older and the hardware gets rarer. Look at what happened to the initio driver in 2008 for instance. That was cleaned up by Alan Cox, no mean expert in the field, with the assistance of a tester with the actual card, so basically a textbook
Quoted 8 lines
operation. However, a bug crept in during this process that wasn't spotted by the tester. When it was spotted (bug report ~6 months later) the original tester wasn't available and code inspection across the cleanup was very hard. Fortunately, the reporter was motivated to track down and patch the driver, so it worked out all right in the end, but a lot of bug reporters aren't so capable (or so motivated). Plus most clean up patches for old hardware tend only to be compile tested, so the potential for bugs is far greater.
I understand the potential for bugs, and am not saying to do this for all drivers, so it is not mandatory at all.
I have just received a bunch of people asking me if we can use drivers/staging/ to get stuff that is known broken, or has other problems (style issues[1]), out into an area where people know it needs to be fixed up otherwise it will be dropped.
thanks,
greg k-h
[1] No, floppy.c doesn't count, no matter how much people might want it
to :)
Quoted 6 lines · Linus Torvalds
Quoted 4 lines · James Bottomley
Quoted 3 lines
I think you are interpreting what should go into
drivers/staging/_very_ narrowly.
Quoted 7 lines
Quoted 1 line
As it is my right to do.
Umm, James, it cuts both ways.
Others can assert their interpretation, and quite frankly, yours is the odd one out. Everybody else agrees oevrwhelmingly that "staging" is about ugly and not-up-to-snuff drivers.
I haven't actually ever said otherwise. I have asserted that the bfa driver, while large, isn't out of the ball park for a FC driver, that it does provide all the correct user visible FC ABI pieces but that it does have minor anomalies, primarily in bfa/include, that need cleaning up, plus it needs to interface to libfc at some future point. I have also asserted that drivers/scsi is the best place to address the remaining issues.
Quoted 4 lines
So you can talk about your 'right' to interpret things all you want, but what's the point? If others haev the same right (which presumably even you agree they do), then if people think a driver is ugly and needs to be in staging, what makes _your_ right so special?
It's a judgement call whether a driver goes through staging or not. I'm happy to hear other opinions about this driver, but I'd like them to be from reading the code, not generalities. I've stated my specific reasons why this driver isn't a good candidate for staging.
Quoted 3 lines
As mentioned earlier, I don't personally care about this driver, but I do care about your behavior. You can't just ignore other people if they say that a driver is too damn ugly.
But no-one's actually said that. The whole discussion was theoretical rather than based on this driver. My position on the generalities is that ABI issues head a driver automatically for staging. For non user visible code based issues, it's a maintainer judgement call where the cleanup is best done, which in turn depends on what the actual issues are. For this specific driver, I've given reasons several times why the changes are best made in drivers/scsi.
James
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Greg KHQuoted 28 lines · Greg KH
Quoted 1 line · Ingo Molnar
Hm, i think i even gave
drivers/staging/its name?Yes you did, and I appreciate it :)
Quoted 8 lines
Quoted 2 lines
[...] It seems that I'm the only one that has the ability to drop drivers out of the kernel tree, which is a funny situation :)
You are the only one who has the ability to send a warning shot towards drivers
_withouthurtingusers_, and by moving it into the focus of a team of cleanup oriented developers.I think that's an important distinction ;-)
Good point.
Quoted 12 lines
Quoted 12 lines
In thinking about this a lot more, I don't really mind it. If people want to push stuff out of "real" places in the kernel, into
drivers/staging/and give the original authors and maintainers notice about what is going on, _and_ provide a TODO file for what needs to happen to get the code back into the main portion of the kernel tree, then I'll be happy to help out with this and manage it.I think a 6-9 month window (basically 3 kernel releases) should be sufficient time to have a driver that has been in
drivers/staging/be cleaned up enough to move back into the main kernel tree. If not, it could be easily dropped.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Any objections to this?
Sounds excellent to me!
Great, I'll await the patches to move stuff to
drivers/staging/now.Wireless developers, warm up your editors :)
OK -- prism54 seems like a good candidate, instead of removing it completely as I originally outlined on the feature removal schedule. Do we have a file to give notices to move drivers to staging because they are old as with the feature removal schedule? The more visible these things become the better it is for users.
Luis
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
Quoted 35 lines · Luis R. Rodriguez
Quoted 34 lines · Greg KH
Quoted 1 line · Ingo Molnar
Hm, i think i even gave
drivers/staging/its name?Yes you did, and I appreciate it :)
Quoted 8 lines
Quoted 2 lines
[...] It seems that I'm the only one that has the ability to drop drivers out of the kernel tree, which is a funny situation :)
You are the only one who has the ability to send a warning shot towards drivers
_withouthurtingusers_, and by moving it into the focus of a team of cleanup oriented developers.I think that's an important distinction ;-)
Good point.
Quoted 7 lines
Quoted 7 lines
In thinking about this a lot more, I don't really mind it. ??If people want to push stuff out of "real" places in the kernel, into
drivers/staging/and give the original authors and maintainers notice about what is going on, _and_ provide a TODO file for what needs to happen to get the code back into the main portion of the kernel tree, then I'll be happy to help out with this and manage it.Quoted 8 lines
Quoted 6 lines
I think a 6-9 month window (basically 3 kernel releases) should be sufficient time to have a driver that has been in
drivers/staging/be cleaned up enough to move back into the main kernel tree. ??If not, it could be easily dropped.Any objections to this?
Sounds excellent to me!
Great, I'll await the patches to move stuff to
drivers/staging/now.
Quoted 7 lines
Quoted 1 line
Wireless developers, warm up your editors :)
OK -- prism54 seems like a good candidate, instead of removing it completely as I originally outlined on the feature removal schedule. Do we have a file to give notices to move drivers to staging because they are old as with the feature removal schedule? The more visible these things become the better it is for users.
We've found that the feature removal file is also ignored :)
How about when it was scheduled to be removed, we put it in staging and I'll add it to my announcements about the staging tree every release?
Unless you can think of a better way?
thanks,
greg k-h
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
Quoted 3 lines · Greg KH
How about when it was scheduled to be removed, we put it in staging and I'll add it to my announcements about the staging tree every release? Unless you can think of a better way?
staging/to_be_removed_unless_fixed_by/v.x.y ?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
Quoted 6 lines · Joe Perches
Quoted 3 lines · Greg KH
How about when it was scheduled to be removed, we put it in staging and I'll add it to my announcements about the staging tree every release? Unless you can think of a better way?
staging/to_be_removed_unless_fixed_by/v.x.y ?
Yes, that's a real worry. Some time ago i suggested:
drivers/staging/good/
drivers/staging/bad/
drivers/staging/ugly/
good: drivers that are to go upstream in the next cycle bad: outgoing drivers being obsoleted or abandoned ugly: incoming messy drivers with active developers
The messaging of this looks nice and the names are short and obvious.
An added benefit is that this kind of separation makes it easy for people interested in drivers/staging to follow the 'status' of drivers. Once stuff goes into 'good' a different kind of review is needed than if a driver goes into 'ugly'.
The main disadvantage would be the PR angle: putting new drivers into a path named 'ugly'. Not something you want to put into a quarterly status report, right? If we put drivers/staging/ugly/ drivers into drivers/staging/ itself, we'd solve that problem. I.e. we'd keep the current scheme, but we'd also add drivers/staging/good/ and drivers/staging/bad/ as two extra stages for incoming and outgoing drivers.
A third version would be a more neutral name:
drivers/staging/incoming/
drivers/staging/outgoing/
I think it has many advantages, but (of course!) it all depends on whether Greg wants to have any separation like this.
Ingo
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
Quoted 10 lines · Ingo Molnar
Yes, that's a real worry. Some time ago i suggested:
drivers/staging/good/
drivers/staging/bad/
drivers/staging/ugly/good: drivers that are to go upstream in the next cycle bad: outgoing drivers being obsoleted or abandoned ugly: incoming messy drivers with active developers
Quoted 5 lines
The messaging of this looks nice and the names are short and obvious.
An added benefit is that this kind of separation makes it easy for people interested in
drivers/stagingto follow the 'status' of drivers. Once stuff goes into 'good' a different kind of review is needed than if a driver goes into 'ugly'.The main disadvantage would be the PR angle: putting new drivers into a path named 'ugly'. Not something you want to put into a quarterly status report, right? If we put
drivers/staging/ugly/drivers intodrivers/staging/itself, we'd solve that problem. I.e. we'd keep the current scheme, but we'd also adddrivers/staging/good/anddrivers/staging/bad/as two extra stages for incoming and outgoing drivers.
Change "ugly" to "wip" (work in progress). Should remove the negative connotation and keeps things short. Does miss the spaghetti western theme though :)
-- james s
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
Quoted 5 lines · Joe Perches
Quoted 3 lines · Greg KH
How about when it was scheduled to be removed, we put it in staging and I'll add it to my announcements about the staging tree every release? Unless you can think of a better way?
Quoted 7 lines
Quoted 1 line
staging/to_be_removed_unless_fixed_by/v.x.y ?
Yes, that's a real worry. Some time ago i suggested:
drivers/staging/good/
drivers/staging/bad/
drivers/staging/ugly/
How well do "git am", "quilt import" and friends cope with ever changing directories?
How about using drivers/staging/this_driver/TODO and (or) its Kconfig help text to leave a note about the plans for this driver?
The worry that these will be ignored like Documentation/feature-removal-schedule.txt is being ignored may apply to the path name based solution too, I'm afraid.
(Besides, Greg's release announcements are a good channel for this. These announcements are actually picked up by the specialized press.)
Signature · 3 lines
Stefan Richter -=====-==--= =-=- -===- http://arcgraph.de/sr/
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
Quoted 10 lines · Stefan Richter
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Joe Perches
Quoted 3 lines · Greg KH
How about when it was scheduled to be removed, we put it in staging and I'll add it to my announcements about the staging tree every release? Unless you can think of a better way?
staging/to_be_removed_unless_fixed_by/v.x.y ?
Quoted 8 lines
Quoted 5 lines
Yes, that's a real worry. Some time ago i suggested:
drivers/staging/good/
drivers/staging/bad/
drivers/staging/ugly/How well do "git am", "quilt import" and friends cope with ever changing directories?
Once a driver is in a tree it's in Git and git mv is easy. People working with Linux better familiarize themselves with Git workflow - the sooner the better.
If it's not in tree then it will adopt to whatever layout there is once it gets into Greg's tree. I dont see the problem.
Quoted 2 lines
How about using
drivers/staging/this_driver/TODOand (or) itsKconfighelp text to leave a note about the plans for this driver?
Well, the answer is obvious i think. Tell me, at a glance, if you see a patch on lkml, which one is for a staging driver to be obsoleted, and which one is the one going upstream real soon? The patches say:
+++ a/drivers/staging/foo/x.c
+++ a/drivers/staging/bar/y.c
Then tell me the same at a glance if you see patches for:
+++ a/drivers/staging/wip/x.c
+++ a/drivers/staging/bad/y.c
Quoted 3 lines
The worry that these will be ignored like
Documentation/feature-removal-schedule.txtis being ignored may apply to the path name based solution too, I'm afraid.
It wont be 'ignored', as it's in every patch, it's in every commit, it's in every substantial communication about that driver.
The problem with feature-removal-schedule.txt is that it's too much out of sight and not part of the regular patch workflow. Same goes for any TODO file. Experience has shown that the actual _path_ were drivers end up does matter quite a bit, to general visibility and to mindset.
That's one of the reasons why we have _half a thousand_ directories in drivers/ to begin with. The directory namespace is very powerful, and we use it to convey all sorts of information about the logical category a driver is in.
Using it in drivers/staging/ instead of the current flat hierarchy would thus be pretty natural.
Ingo
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
Quoted 3 lines · Ingo Molnar
Quoted 2 lines · Stefan Richter
How well do "git am", "quilt import" and friends cope with ever changing directories?
[Perhaps the -p option does the trick. And git-am could be done on a temporary branch from before the move of the files.]
Quoted 3 lines
Once a driver is in a tree it's in Git and git mv is easy. People working with Linux better familiarize themselves with Git workflow - the sooner the better.
Even if author and committer both work with git, they often use e-mail to transfer patches.
Quoted 2 lines
If it's not in tree then it will adopt to whatever layout there is once it gets into Greg's tree.
Many "good" drivers will start as "ugly" or "bad" ones.
Quoted 9 lines
Quoted 2 lines
How about using
drivers/staging/this_driver/TODOand (or) itsKconfighelp text to leave a note about the plans for this driver?Well, the answer is obvious i think. Tell me, at a glance, if you see a patch on lkml, which one is for a staging driver to be obsoleted, and which one is the one going upstream real soon? The patches say:
+++
a/drivers/staging/foo/x.c
Quoted 7 lines
+++
a/drivers/staging/bar/y.cThen tell me the same at a glance if you see patches for:
+++
a/drivers/staging/wip/x.c+++
a/drivers/staging/bad/y.c
Does this information matter much?
What's more interesting is whether development activity will _lead_ to a driver being moved from bad or ugly to good.
Signature · 3 lines
Stefan Richter -=====-==--= =-=- -===- http://arcgraph.de/sr/
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Ingo MolnarQuoted 16 lines · Ingo Molnar
Quoted 6 lines · Joe Perches
Quoted 3 lines · Greg KH
How about when it was scheduled to be removed, we put it in staging and I'll add it to my announcements about the staging tree every release? Unless you can think of a better way?
staging/to_be_removed_unless_fixed_by/v.x.y ?
Yes, that's a real worry. Some time ago i suggested:
drivers/staging/good/
drivers/staging/bad/
drivers/staging/ugly/
Quoted 5 lines
good: drivers that are to go upstream in the next cycle bad: outgoing drivers being obsoleted or abandoned ugly: incoming messy drivers with active developersThe messaging of this looks nice and the names are short and obvious.
Yeah, but they make my life much harder than it needs to be.
I'd prefer to stick with the directory naming scheme we have today, it seems to work well so far.
thanks,
greg k-h
Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
In reply to Stefan RichterQuoted 9 lines · Stefan Richter
Quoted 9 lines
Well, the answer is obvious i think. Tell me, at a glance, if you see a patch on lkml, which one is for a staging driver to be obsoleted, and which one is the one going upstream real soon? The patches say:
+++
a/drivers/staging/foo/x.c+++
a/drivers/staging/bar/y.c
Quoted 7 lines
Quoted 5 lines
Then tell me the same at a glance if you see patches for:
+++
a/drivers/staging/wip/x.c+++
a/drivers/staging/bad/y.cDoes this information matter much?
Yes. You might not appreciate it as you are active in a relatively narrow field (so all patches in your world have an 'obvious' place) - but i for example take most of the context of a change from the email itself and the more self-descriptive it is, the better. I would be more likely to review work-in-progress patches while not bother about obsolete drivers on the way out. YMMV.
Quoted 2 lines
What's more interesting is whether development activity will _lead_ to a driver being moved from bad or ugly to good.
... a prerequisite of which is for more developers to be accutely aware of in what state a driver is.
Anyway ... it's all up to Greg and he indicated that he wants the simplest structure, which is fair enough.
Ingo