IP Library Granted Patent US 8,892,787
Granted Patent B2
US 8,892,787 · App. 13/412,908 · Granted Nov 18, 2014

Methods and apparatus for packing received frames in buffers in a serial attached SCSI (SAS) device

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,892,787
App. No.
13/412,908
Granted
Nov 18, 2014
Kind
B2
Abstract

Methods and apparatus for packing received Serial Attached SCSI (SAS) frames in buffers for transmission to a host system memory. SAS frames are received from another SAS device and stored in a frame buffer memory. User data in the received frames has appended SCSI Data Integrity Fields (DIF information) to enhance reliability. Features and aspects hereof use the DIF information to validate the user data and then strip the DIF information to densely pack the validated user data in a DMA staging buffer for transmission to a host's system buffer memory using DMA features of the SAS device. The DMA circuit is programmed and started when the staging buffer is filled to at least a threshold amount of data to thereby improve efficacy of the DMA transfer performance. Other criteria may also be employed to determine when to start the DMA circuit.

Claims (71)

1. An apparatus in a Serial Attached SCSI (SAS) device configured to buffer data for transmission to a system buffer memory of an attached host device, the apparatus comprising:

a frame buffer memory adapted to store frames as they are received from another SAS device wherein received frames each comprise one or more of: user data and data integrity field (DIF) information for validating user data;

a direct memory access (DMA) staging buffer memory adapted to store user data derived from received frames for transmission to a system buffer memory in a system coupled with the SAS device;

a DMA circuit coupled with the DMA staging buffer memory and adapted to controllably transfer user data from the DMA staging buffer memory to the system buffer memory;

an end to end data protection (EEDP) circuit coupled with the frame buffer memory and adapted to validate user data in a received frame using associated DIF information in a received frame; and

control logic coupled with the EEDP circuit and with the DMA circuit and with the frame buffer memory and with the DMA staging buffer memory, the control logic adapted to, responsive to the EEDP circuit validating user data in a received frame, eliminate DIF information associated with the valid user data, and copy the valid user data from the frame buffer memory into the DMA staging buffer memory contiguous with other valid user data, such that the DMA staging buffer includes valid user data without including DIF information,

the control logic further adapted to start the DMA circuit to send valid user data in the DMA staging buffer memory to the system buffer memory responsive to sensing that the amount of valid user data in the DMA staging buffer memory exceeds a predetermined threshold value.

2. The apparatus of claim 1

wherein the control logic is further adapted to determine whether a received frame is a continuation of a preceding received frame, and

wherein the control logic is further adapted to start the DMA circuit to send valid user data in the DMA staging buffer memory to the system memory responsive to determining that the received frame is not a continuation of the preceding received frame.

3. The apparatus of claim 2 wherein each received frame further comprises frame overhead information and wherein the control logic is further adapted to determine whether a received frame is a continuation of a preceding received frame based on frame overhead information of the received frame and frame overhead information of the preceding received frame.

4. The apparatus of claim 3

wherein the control logic is further adapted to determine that the received frame is a continuation of the preceding received frame by determining from the frame overhead information of the received frame and the frame overhead information of the preceding received frame that:

a type field of the received frame equals a type field of the preceding received frame, and that

a data offset field of the received frame equals the sum of a data offset field of the preceding received frame and a number of user data bytes field in the preceding received frame, and that

a transfer tag field of the received frame equals a transfer tag field of the preceding received frame, and that

a SAS protocol field of the received frame equals a SAS protocol field of the preceding received frame.

5. The apparatus of claim 4

wherein the control logic is further adapted to determine that the transfer tag field of the received frame equals the transfer tag field of the preceding received frame by determining that the initiator port transfer tag (IPTT) of the received frame equals the IPTT of the preceding received frame when the SAS device is operating in an initiator mode, or determining that the target port transfer tag (TPTT) of the received frame equals the TPTT of the preceding received frame when the SAS device is operating in a target mode.

6. A method for operating a Serial Attached SCSI (SAS) device to buffer user data to be sent to a system buffer memory of an attached host device, the method comprising:

receiving a plurality of frames from another SAS device, each frame comprising one or more of: user data and data integrity field (DIF) information for validating user data;

storing the plurality of frames in a frame buffer memory of the SAS device;

determining whether user data in the frame buffer memory is valid using associated DIF information in the frame buffer memory;

responsive to determining that user data in the frame buffer memory is valid, eliminating the DIF information associated with the valid user data, copying the valid user data from the frame buffer memory into a direct memory access (DMA) staging buffer memory, wherein the valid user data is contiguous with other valid user data, such that the DMA staging buffer includes valid user data without including DIF information;

responsive to sensing that the amount of valid user data in the DMA staging buffer memory exceeds a predetermined threshold value, starting a DMA circuit of the SAS device to send valid user data in the DMA staging buffer memory to a system buffer memory of another device.

7. The method of claim 6 further comprising:

determining whether a received frame is a continuation of a preceding received frame, and

starting the DMA circuit to send valid user data in the DMA staging buffer memory to the system memory responsive to determining that the received frame is not a continuation of the preceding received frame.

8. The method of claim 7

wherein each received frame further comprises frame overhead information,

wherein the step of determining whether a received frame is a continuation of a preceding received frame further comprises determining whether the received frame is a continuation based on frame overhead information of the received frame and frame overhead information of the preceding received frame.

9. The method of claim 8

wherein the step of determining that the received frame is a continuation of the preceding received frame further comprises determining that the received frame is a continuation by determining from the frame overhead information of the received frame and the frame overhead information of the preceding received frame that:

a type field of the received frame equals a type field of the preceding received frame, and that

a data offset field of the received frame equals the sum of a data offset field of the preceding received frame and a number of user data bytes field in the preceding received frame, and that

a transfer tag field of the received frame equals a transfer tag field of the preceding received frame, and that

a SAS protocol field of the received frame equals a SAS protocol field of the preceding received frame.

10. The method of claim 9

wherein the step of determining that a transfer tag field of the received frame equals that of the preceding received frame further comprises determining that the initiator port transfer tag (IPTT) of the received frame equals the IPTT of the preceding received frame when the SAS device is operating in an initiator mode, or determining that the target port transfer tag (TPTT) of the received frame equals the TPTT of the preceding received frame when the SAS device is operating in a target mode.

11. A non-transitory computer readable medium tangibly storing programmed instructions that when executed by a computer perform a method in a Serial Attached SCSI (SAS) device, wherein the method buffers user data to be sent to a system buffer memory of an attached host device, the method comprising:

receiving a plurality of frames from another SAS device, each frame comprising one or more of: user data and data integrity field (DIF) information for validating user data;

storing the plurality of frames in a frame buffer memory of the SAS device;

determining whether user data in the frame buffer memory is valid using associated DIF information in the frame buffer memory;

responsive to determining that user data in the frame buffer memory is valid, eliminating the DIF information associated with the valid user data, copying the valid user data from the frame buffer memory into a direct memory access (DMA) staging buffer memory, wherein the valid user data is contiguous with other valid user data, such that the DMA staging buffer includes valid user data without including DIF information;

responsive to sensing that the amount of valid user data in the DMA staging buffer memory exceeds a predetermined threshold value, starting a DMA circuit of the SAS device to send valid user data in the DMA staging buffer memory to a system buffer memory of another device.

12. The medium of claim 11 the method further comprising:

determining whether a received frame is a continuation of a preceding received frame, and

starting the DMA circuit to send valid user data in the DMA staging buffer memory to the system memory responsive to determining that the received frame is not a continuation of the preceding received frame.

13. The medium of claim 12

wherein each received frame further comprises frame overhead information,

wherein the method step of determining whether a received frame is a continuation of a preceding received frame further comprises determining whether the received frame is a continuation based on frame overhead information of the received frame and frame overhead information of the preceding received frame.

14. The medium of claim 13

wherein the method step of determining that the received frame is a continuation of the preceding received frame further comprises determining that the received frame is a continuation by determining from the frame overhead information of the received frame and the frame overhead information of the preceding received frame that:

a type field of the received frame equals a type field of the preceding received frame, and that

a data offset field of the received frame equals the sum of a data offset field of the preceding received frame and a number of user data bytes field in the preceding received frame, and that

a transfer tag field of the received frame equals a transfer tag field of the preceding received frame, and that

a SAS protocol field of the received frame equals a SAS protocol field of the preceding received frame.

15. The medium of claim 14

wherein the method step of determining that a transfer tag field of the received frame equals that of the preceding received frame further comprises determining that the initiator port transfer tag (IPTT) of the received frame equals the IPTT of the preceding received frame when the SAS device is operating in an initiator mode, or determining that the target port transfer tag (TPTT) of the received frame equals the TPTT of the preceding received frame when the SAS device is operating in a target mode.

16. The system of claim 1 , wherein:

the DMA staging buffer memory stores only valid user data.

17. The method of claim 6 , wherein:

the DMA staging buffer memory stores only valid user data.

18. The medium of claim 11 , wherein:

the DMA staging buffer memory stores only valid user data.

19. The system of claim 1 , wherein:

the control logic is further operable to eliminate the DIF information associated with the valid user data by:

removing the DIF information associated with the valid user data from the frame buffer.

20. The method of claim 6 , wherein:

eliminating the DIF information associated with the valid user data comprises:

removing the DIF information associated with the valid user data from the frame buffer.

Assignments (9)
CORRECTIVE ASSIGNMENT TO CORRECT THE PATENT NUMBER 9,385,856 TO 9,385,756 PREVIOUSLY RECORDED AT REEL: 47349 FRAME: 001. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER. Recorded Mar 22, 2019
From: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
To: AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE. LIMITED
Reel/Frame 051144/0648 →
CORRECTIVE ASSIGNMENT TO CORRECT THE EFFECTIVE DATE PREVIOUSLY RECORDED ON REEL 047229 FRAME 0408. ASSIGNOR(S) HEREBY CONFIRMS THE THE EFFECTIVE DATE IS 09/05/2018. Recorded Oct 29, 2018
From: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
To: AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE. LIMITED
Reel/Frame 047349/0001 →
MERGER Recorded Oct 4, 2018
From: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
To: AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE. LIMITED
Reel/Frame 047229/0408 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS Recorded Feb 3, 2017
From: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
To: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
Reel/Frame 041710/0001 →
PATENT SECURITY AGREEMENT Recorded Feb 11, 2016
From: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 037808/0001 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENT RIGHTS (RELEASES RF 032856-0031) Recorded Feb 2, 2016
From: DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENT
To: LSI CORPORATION; AGERE SYSTEMS LLC
Reel/Frame 037684/0039 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 3, 2015
From: LSI CORPORATION
To: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
Reel/Frame 035390/0388 →
PATENT SECURITY AGREEMENT Recorded May 8, 2014
From: LSI CORPORATION; AGERE SYSTEMS LLC
To: DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENT
Reel/Frame 032856/0031 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 6, 2012
From: DAY, BRIAN A.; KADEKODI, PARAMESHWAR ANANTH; SATISHCHANDRA, KABRA NITIN
To: LSI CORPORATION
Reel/Frame 027812/0170 →