1
linux/drivers/scsi/isci/core
Dan Williams fe9a643157 isci: pad stp and smp request sizes
Ross says:
 "The memory allocation for these requests doesn’t take into account the
  additional memory needed when the code in
  scic_sds_s[mst]p_request_assign_buffers() shifts the struct
  scu_task_context so that it is cache line aligned:

  In an example from my machine, total buffer that I’ve given to SCIC goes
  from 0x410024566f84 to 0x410024567308.  From this same example, this
  call shifts my task_context_buffer from 0x410024567208 to
  0x410024567240.

  This means that the task_context_buffer that used to range from
  0x410024567208 to 0x410024567308 instead now goes from 0x410024567240 to
  0x410024567340.

  When the memset() call at the end of scic_task_request_construct()
  clears out this task_context_buffer, it does so from 0x410024567240 to
  0x410024567340, effectively killing whatever buffer follows this
  allocation in memory."

djbw:
Use the kernel's PTR_ALIGN instead of
scic_sds_request_align_task_context_buffer() and SMP_CACHE_BYTES instead of
the local CACHE_LINE_SIZE definition.

TODO: These allocations really want to be better defined in a union rather
than opaque buffers carved up by macros.

Reported-by: Ross Zwisler <ross.zwisler@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2011-07-03 03:55:29 -07:00
..
intel_ata.h
intel_sas.h
intel_sat.h
intel_sata.h
intel_scsi.h
sati_device.h
sati_translator_sequence.h
sati_types.h
sci_base_controller.h
sci_base_memory_descriptor_list.c isci: remove SCI_INVALID_HANDLE 2011-07-03 00:36:31 -07:00
sci_base_memory_descriptor_list.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
sci_base_phy.h isci: phy state machine cleanup step1 2011-07-03 03:55:27 -07:00
sci_base_port.h
sci_base_remote_device.h isci: coding style changes for remote device 2011-07-03 03:55:27 -07:00
sci_base_request.h
sci_base_state_machine.c
sci_base_state_machine.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
sci_base_state.h
sci_controller_constants.h
sci_controller.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
sci_memory_descriptor_list.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
sci_object.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
sci_pool.h
sci_status.h
sci_util.c isci: have the driver use native SG calls and DMA-API 2011-07-03 03:55:28 -07:00
sci_util.h isci: have the driver use native SG calls and DMA-API 2011-07-03 03:55:28 -07:00
scic_config_parameters.h isci: clean up remaining silicon revision ifdefs in phy init 2011-07-03 03:55:28 -07:00
scic_controller.h isci: remove scic_controller_get_handler_methods and ilk 2011-07-03 03:55:27 -07:00
scic_io_request.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scic_phy.h isci: advertise linkrate 2011-07-03 03:55:27 -07:00
scic_port.h isci: workaround port task scheduler starvation issue 2011-07-03 03:55:28 -07:00
scic_remote_device.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scic_sds_controller_registers.h
scic_sds_controller.c isci: Cleanup warning messages for phy resets 2011-07-03 03:55:29 -07:00
scic_sds_controller.h isci: controller stop/start fixes 2011-07-03 03:55:29 -07:00
scic_sds_pci.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scic_sds_phy_registers.h isci: Add support for user parameters in SCIC layer 2011-07-03 03:55:27 -07:00
scic_sds_phy.c isci: Cleanup warning messages for phy resets 2011-07-03 03:55:29 -07:00
scic_sds_phy.h isci: controller stop/start fixes 2011-07-03 03:55:29 -07:00
scic_sds_port_configuration_agent.c isci: Change event notify calls from scic_cb_* to isci_event_* 2011-07-03 03:55:28 -07:00
scic_sds_port_configuration_agent.h
scic_sds_port_registers.h isci: Move transport layer registers from port to phy 2011-07-03 03:55:27 -07:00
scic_sds_port.c isci: fix hang after target reset 2011-07-03 03:55:29 -07:00
scic_sds_port.h isci: workaround port task scheduler starvation issue 2011-07-03 03:55:28 -07:00
scic_sds_remote_device.c isci: controller stop/start fixes 2011-07-03 03:55:29 -07:00
scic_sds_remote_device.h isci: kill a callback cast 2011-07-03 03:55:27 -07:00
scic_sds_remote_node_context.c isci: Move transport layer registers from port to phy 2011-07-03 03:55:27 -07:00
scic_sds_remote_node_context.h isci: remote device and node cleanup step1 2011-07-03 00:36:31 -07:00
scic_sds_remote_node_table.c
scic_sds_remote_node_table.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scic_sds_request.c isci: pad stp and smp request sizes 2011-07-03 03:55:29 -07:00
scic_sds_request.h isci: pad stp and smp request sizes 2011-07-03 03:55:29 -07:00
scic_sds_smp_remote_device.c isci: Removing deprecated functions 2011-07-03 03:55:28 -07:00
scic_sds_smp_request.c isci: pad stp and smp request sizes 2011-07-03 03:55:29 -07:00
scic_sds_smp_request.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scic_sds_ssp_request.c isci: cleanup core consolidation leftovers 2011-07-03 00:36:31 -07:00
scic_sds_stp_packet_request.c isci: have the driver use native SG calls and DMA-API 2011-07-03 03:55:28 -07:00
scic_sds_stp_packet_request.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scic_sds_stp_pio_request.h
scic_sds_stp_remote_device.c isci: handle cases where a d2h fis is used report an ncq error 2011-07-03 03:55:29 -07:00
scic_sds_stp_request.c isci: pad stp and smp request sizes 2011-07-03 03:55:29 -07:00
scic_sds_stp_request.h isci: Make the driver copy data directly from and to sg for PIO 2011-07-03 03:55:28 -07:00
scic_sds_unsolicited_frame_control.c isci: Removing deprecated functions 2011-07-03 03:55:28 -07:00
scic_sds_unsolicited_frame_control.h
scic_task_request.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scu_completion_codes.h isci: Add Support for new TC completion codes 2011-07-03 03:55:28 -07:00
scu_constants.h
scu_event_codes.h
scu_registers.h isci: Add support for user parameters in SCIC layer 2011-07-03 03:55:27 -07:00
scu_remote_node_context.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scu_task_context.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scu_unsolicited_frame.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00
scu_viit_data.h isci: kill sci_types.h 2011-07-03 00:36:31 -07:00