text:
Q: PHP & MySQL Timezones whilst supporting user-defined timezones I'm working on something where the user can select their own timezone and the software will be able to be used by others on their sites as well but I want to make sure that the timezone within the database is always set to UTC.
Now I know how you set the default timezone for PHP, such as:
date_default_timezone_set('Australia/Sydney');

...but I'm not sure how to make sure MySQL is using UTC? ...and even once you have made sure it is using UTC I guess you would have to convert your PHP dates/times into UTC before passing it to the database?
I guess I am wondering about many different date formats such as TIMESTAMP, DATETIME & even UNIX EPOCH integer timestamps which would simply be stored as a int datatype for example.
Then there is the whole retrieving dates/times from the DB and converting it to the respective timezone and lastly how does DST come into all of this?
I know there is a lot of similar questions out there, but I guess none really answered all my questions.

A: MySQL's data type timestamp stores the dates in UTC. For this to work properly, MySQL uses server's time zone and does the date conversion. It converts the date from servers's current time zone to UTC for storage. This implies that the database server should never change its time zone for this feature to work properly.
When you send the data to such a database, you send the UTC time as well. The easiest way to do this is to format a result of time() according to what MySQL wants (m-d-Y H:i:s).
In PHP, when you format the date for insertion to MySQL, it's the best to use DateTime class. It lets you offset the date with the time zone information, meaning that you don't have to use date_default_timezone_set function - that can lead to mistakes.
An example of DateTime in action:
$date = '1.12.2015 13:37:37'; // Format is day.month.year hour:minute:second

// We create DateTime from custom date format, for the person who resides in Australia/Sydney time zone
$dt = DateTime::createFromFormat('d.m.Y H:i:s', $date, new DateTimeZone('Australia/Sydney');

// Now we change the date's time zone into UTC, and we can insert it into MySQL
$dt->setTimeZone(new DateTimeZone('UTC'));

// This is the formatted date-string that can be safely inserted into MySQL
$date_string_for_mysql = $dt->format('m-d-Y H:i:s');

Alternatively, you can use int type in MySQL for timestamp storage and insert result of time() but this has a huge disadvantage of not being able to use date-related functions.

A: for current session of mysql you can try something like
SET time_zone = timezonename;

for more details you can also look into this answer https://dba.stackexchange.com/questions/20217/mysql-set-utc-time-as-default-timestamp


RealTime online content is currently being updated on a weekly basis. We provide a diverse range of coverage including previews of upcoming events, reviews of current exhibitions and shows, and longform critical analysis. Consequently the submission timelines vary depending on the type of content.
RealTime's editorial focus is on innovation in contemporary performance (including live art, experimental theatre, dance, music, sound), photomedia, film, video, interactive media and hybrids of these.
RealTime primarily commissions articles, interviews and reviews [rates and conditions available on request], however submissions of 500-1500 words are welcome (no footnotes).
Proposals should be sent with a one page curriculum vitae, a brief statement of interest (including areas of expertise), 2-3 recent samples, published or not, of the writer's work (academic essays, thesis chapters, fiction, scripts and poetry not acceptable).


Every now and then we come across stories which shock us, today we have heard that someone recently thought she was purchasing an Apple iPad, however soon found out that she had been duped when she realized that she had in fact brought a piece of wood in the shape of an iPad – yes you read that right!
Apparently Ashley McDowell, 22, was at a parking lot near McDonald's in Spartanburg County, South Carolina, when some men approached her asking if she wanted to buy an iPad – they told her they bought several of them and were willing to sell the iPad for just $300 (at least $199 cheaper than Apple's retail price), however in the end she got herself a bargain and paid just $180 – or so she thought.
When Miss McDowell got home she opened the FedEx box which contained the iPad only to find a piece of wood which had been painted black with an Apple logo on it – now that's what we call attention to detail. Needless to say she was unimpressed and contacted the police who are now looking for two men driving a white Chevy Impala with no rims and untinted windows – you can find out more information over at PostChronicle.
According to reports most of these scams have taking place in and around parking lots and convenience stores in Grand Prairie, needless to say unless you want a new doorstop you should either demand to see the product first or immediately turn down the fabulous sounding deal. As the famous saying goes: "If it seems too good to be true, it probably is".
You can see the $180 wooden iPad below, we would love to hear from you if you or a friend has been affected by a similar scam feel free to share your shame in the comments section below.


text:
Q: Auth0: Is there a way to switch accounts? I am using next-auth to allow users to sign in, but once they are signed in, there is no visible way to switch accounts. Similarly, when they enter wrong credentials, there is no option to sign in with a different account.
Is there a way for users to switch accounts?

A: Build a wrapper around your app that would store accounts. You want to store a new account in the accounts storage when user add one.

redpajama_set_name: RedPajamaStackExchange


What Are the Best Apps to Help Me Prepare My Taxes?
I'm getting ready to do my taxes soon and would like to know if there are any good mobile apps or websites that will make this less painful and stressful (besides the obvious tax prep tools, of course). Help me get all the stuff I need organized!
Ah, tax season. Just the thought of it gives some of us headaches. The good news is there are lots of free and inexpensive apps and tools that can greatly simplify this awful process, from getting organized to filing your return. Here's what we recommend.
If you have an uncomplicated return (one W2, for example, and take the standard deduction), congratulations: You don't have to worry much about organizing your tax records. For everyone else, though, managing the piles of receipts and other documents is a big part of the pain. Several apps can help with that.
Evernote: The Swiss Army knife of note taking and capture tools, Evernote excels at keeping your documents categorized into notebooks. You can set up a tax notebook and then either sub-notebooks or tags for different categories like income statements, interest earned, charitable contributions, and the like. Combine Evernote with compact scanner Doxie or ScanSnap, and you can quickly file your receipts in Evernote. Another strategy is to use webapp automation service IFTTT to automatically send any emails you tag in Gmail with a tax label to your Evernote tax notebook. Handy!
Shoeboxed: If scanning and managing all those papers isn't your thing, take a look at receipt scanning solution Shoeboxed. As we've previously mentioned, you can mail, email, or upload your receipts to Shoeboxed and they'll OCR and categorize the documents for you. You can export those receipts to popular tax programs, as well as Evernote, and mobile apps are available. A free account lets you store 5 documents per month, while premium plans starting at $9.95 give you more capacity.
Slice: Slice is a brilliant receipt and package tracking webapp and mobile app. It scans your Gmail for receipts and gives you an overview of your entire purchase history. Last year, I used the convenient listing to find tax-deductible receipts I had forgotten about.
Expensify (pictured right): If you can take deductible expenses like car mileage and meals and entertainment expenses when you travel for business, Expensify has your back. The mobile apps and web receipts extension capture all those stray receipts and attachments and can turn them into IRS-approved eReceipts. It's a great app for independent contractors.
Your personal finance program and financial accounts: Of course, don't forget to consult your personal finance tool, such as popular Mint or Quicken to see spending by category and find all those deductible expenses. Both can port your information to TurboTax.
TaxCaster by TurboTax (pictured right): Want a sneak peek at how much of a refund (or tax bill) you'll get this year? This free tax refund calculator will estimate your taxes based on your quick inputs. It's available online, for Android, and for iOS.
Bloomberg BNA Quick Tax Reference: This app for Android, iPhone, and BlackBerry gives you instant access to tax rates and other handy information, such as IRA limits, mileage rates, and more. It's developed for financial professionals, but also offers useful tools like quickly calculating your total tax.
TaxACT Central: A companion app to the popular, free tax filing service, TaxACT Central can answer your tax questions and keep you organized, with a convenient checklist of what you need to file. You don't have to use TaxACT for filing to make use of the Android or iPhone app.
We generally recommend going to a tax professional unless you have a very simple return. If yours isn't complicated, though, mobile and desktop apps can streamline filing your return and tracking your refund.
TurboTax SnapTax (pictured right): You can file your taxes in as little as ten minutes using this simple Android and iPhone app. Snap a photo of your W2, answer a few questions, and file right from the phone or online. (Isn't the future great?) This app is only for those who: make under $100,000 ($120,000 if married); only have W2, interest, or unemployment income; and don't own a home. Free to try, but $24.99 to file both federal and state.
H&R Block also offers mobile tax apps. The 1040EZ for Smartphone prepares your simple federal and state returns for free on Android and iPhone. There's also a iPad app not limited to 1040EZ returns, with free federal filing for simple returns and an additional fee for state filing.
Of course, both of these tax services (and many others) have desktop and/or webapps. Not all tax preparation software will give you the same results, though. ConsumerSearch has rounded up reviews of the top four tax prep applications, and Get Rich Slowly has an excellent (yet older) price comparison of these solutions and services.
Grab these apps and put them in a new tax organization folder and you'll be set for this tax season and beyond.


text:
PC Game Streaming Coming to Xbox One
By Michael Andronico 2015-07-29T14:06:00Z
In an interview with The Verge, Xbox lead Phil Spencer confirmed that the company is working to bring PC game streaming to its Xbox One console
With the launch of Windows 10 today (July 29), Xbox One gamers can stream their console games to any PC or tablet running the new operating system. While you can't do the opposite -- beam your PC games to your living room -- Microsoft promises that the functionality is on its way.
In an interview with The Verge, Xbox head Phil Spencer confirmed that Microsoft is working on bringing PC game streaming to the Xbox One. Just last week Spencer revealed via Twitter that mouse and keyboard support was coming to Microsoft's games system, so the ability to play PC games in their entirety seems like a logical next step.
MORE: Our Favorite Xbox One Games
According to Spencer, streaming PC games to Xbox One is considerably more challenging than doing the opposite. Xbox One games being streamed to Windows 10 all come from the same type of machine, but when going from PC to Xbox, Microsoft's console must be able to recognize all different types of personal computers.
"It's actually a little more challenging doing the encoding on the PC side to the Xbox, but challenge is good," Spencer told The Verge.
There's no estimated time frame for when PC-to-Xbox streaming may arrive. Similar functionality is available on Android-based set-top boxes such as the Nvidia Shield and Razer Forge TV, both of which let you play PC games in the living room.
Windows 10 heralds a new desktop-based Xbox app, which allows you to stream Xbox One games to your PC or tablet, record gameplay on your PC and keep up with your friends on Xbox Live. Select upcoming games, such as Gigantic and Fable Legends, will support cross-platform play between Xbox One and Windows 10.
Xbox One game streaming worked well when we tried it earlier this year, and we plan on testing the functionality on a range of budget and high-end Windows devices. For a complete breakdown on Windows 10's pros and cons, check out our full review.
The Best Mice for Gaming
Top Gaming Keyboards
Our Favorite Headsets for Immersive Gaming
Mike Andronico is an Associate Editor at Tom's Guide. Follow Mike at @MikeAndronico. Follow us @TomsGuide, on Facebook and on Google+.

redpajama_set_name: RedPajamaCommonCrawl


text:
Doomsday at the Dunes
Delaware's Death Pen
X Marks the Spot at the X Cave
Published by Megan Borchert at September 1, 2016
Dunes State Park is a popular visitor attraction in Chesterton, Indiana. Located just fifty miles from Chicago, the two thousand acre park was created in 1925. The park was added to the National National Landmarks in 1974, with an ongoing focus on preservation. Many people travel to the park each year to enjoy hiking trails, dunes, the Great Lakes, the nature preserve, cycling, camping, singing sand, fishing, the Haunted Shores, birding, swimming, and sunbathing.
(images:david_l_black/flickr)
The land was originally settled by the Miami and Potawatomi native american tribes. The dunes that ran along the length of the park were along their trade routes and were commonly traveled by both tribes. As the country changed and grew, the area was explored and settled in the nineteenth century. At that time, the area now known as Dunes State Park was home to Fort Petit and City West Settlements.
Many claim that the paranormal events that regularly occur in Indiana's state park are as a result of the settlers that made the land home. Many people claim to see apparitions, of both wild west settlers and the native american tribes. Additionally, even the park rangers report seeing lights bobbing along the edge of the dunes, only to find no one and nothing there upon further discovery. As soon as they leave the area, the lights are visible again. Additionally, it is not uncommon to have reports of voices and frightening sounds that seem to have no explanation.
(images:danielmennerich/flickr)
One of the most infamous events in the state park happened in 1906. At that time, many people traveled to the area in hopes of finding the promise of a better life. One passenger train, full of people searching for a new future, met a tragic fate. The passenger train collided with a freight train outside of Chesterton, where the park is now located. Unfortunately, at the point of collision, many young children were housed in that particular part of the train. Many of them were killed that day, some by instant death and others suffered a more tragic fate of burning to death while they were trapped in the wreckage. Since that time, many people have reported strange occurrences, especially in the area where the accident occurred.
People especially report having electronic failures and problems with the pictures they take. People have commonly reported hearing the voice of a young girl and also the voice of a man. Many have heard screams or cries for help. Some have even smelled fire. It seems that despite the fact the accident was over a hundred years ago, the tragic events of that day have left a permanent mark on the area.
Other reports in the area involve ghostly stories from the nearby Valparaiso public execution site and the events that occurred at the courthouse and jail. Although most of the paranormal activity seems to come from a dark energy as a result of tragic events, one entity seems to be more peaceful in nature. Local residents also commonly report seeing the ghost of a woman, Alice Gray, who spends her time skinny dipping in Lake Michigan.
Lover of all things unusual, Megan is a staff attorney for the state of South Dakota. When she's not stuffed in an office writing case synopses, you can find her at home with her army of Schnauzers, snuggled up with some strong wine and a good book.


text:
Lawsuit Funding, Long Hidden in the Shadows, Faces Calls for More Sunlight
Courts have continued to divide over whether to order disclosure
Jacob Gershman
BiographyJacob Gershman
@jacobgershman
jacob.gershman@wsj.com
March 21, 2018 8:00 am ET
Investors placing bets on commercial lawsuits have long operated under a veil of secrecy. But as litigation funding in the U.S. has spread to more courthouses and transformed into a billion-dollar business, plaintiffs and their faceless financiers are confronting calls for more transparency.
At the urging of the U.S. Chamber of Commerce, the arm of the federal judiciary that oversees procedural rules recently decided to examine whether the court system should require all civil litigants to reveal financing deals with outsiders...
Billionaire Who Helped Bankrupt Gawker Explains Why
Peter Thiel, the billionaire who financially backed Hulk Hogan's lawsuit against Gawker Media, ultimately leading to the media company's bankruptcy in August, says the site was a "singular sociopathic bully." Photo: Getty (Originally published Oct. 31, 2016)


text:
Dzvukamanja ready to shine at Orlando Pirates
1st October 2020 Football, Sport
By Sports Reporter
Zimbabwe international forward Terrence Dzvukamanja has set himself the personal target of scoring more goals and providing more assists during the upcoming South African Premiership season following his big move to Orlando Pirates.
Dzvukamanja last week joined South African football giants on a three-year deal after an impressive season with the now defunct Absa Premiership side Bidvest Wits.
Speaking for the first time about his new chapter at Pirates, the former Ngezi Platinum Stars player vowed to become a better player at his new club.
"Personal goals are what drive all players to better themselves day by day. For me, its two-fold, it's about scoring goals – hopefully double digits and also about increasing my number of assists for the season," he said in his first interview with Orlando Pirates' official website.
"I think as an attacking player, these are two areas that a player is judged. I have come here to serve and honour this badge. I promise to give 110% effort every time, be it in training and in matches. Once a Pirate, always a Pirate!"
The 26-year-old forward, who has previously spoken of his desire to play in Europe said he was hopeful that his move to Orlando Pirates would provide him with the steppingstone to realise his dream.
Warriors star Marshall Munetsi was the last Zimbabwean to feature for Pirates before earning a move to Europe where he now plays for French topflight side Stade de Reims.
"I don't want to see myself as somebody who came to Orlando Pirates just to add numbers. I have come here to work, and this is what I hope shows in my performances.
"I want to make a difference here and if all goes well, hopefully I can achieve another goal of mine which is to one day play in Europe. I got a good reception from my teammates. Some are familiar faces of course because of our time from Wits."
Dzvukamanja joined Wits from Ngezi Platinum FC in 2018, where he went on to make 52 appearances in South Africa's top league, scoring 14 goals in all competitions since then.
His performances last season earned him praise from his former coach at Wits, Gavin Hunt after an inspiring show against Mamelodi Sundowns.
Dzvukamanja said he was humbled by the plaudits from the highly rated coach who is now at Pirates' bitter rivals Kaizer Chiefs.
"Yah I feel good about that. When a big coach like Gavin Hunt praises you, that means you are doing something good. For me, I always aim to do my best…unfortunately, Sundowns were just a little bit better than us on that day.
"But overall, in terms of the overall acknowledgement and recognition I am happy because this all means that people have seen something in me," he said.


Home » Business » How do I Report Someone to a Credit Bureau. In case there is a person who owes you with money and he is refusing to pay you with the money you have lent to him, you can file a report in a credit agency for the money that has been taken away from you.... You are also required to provide them with the name, address and phone number of the agency you used to run the credit report and inform them of their right to request a free copy of their credit report from the agency within 60 days.
21/07/2018 · A lingering blemish on your credit report might go unnoticed and then get buried if you fail to request a report every year, leaving you with a mysteriously low credit score and no reasons why. Print and archive your credit report.... You are also required to provide them with the name, address and phone number of the agency you used to run the credit report and inform them of their right to request a free copy of their credit report from the agency within 60 days.
Run A Credit Report On Someone . Maximize or go beyond your credit limit will not only reduce your score, it can also send the wrong impression to other lenders that you have submitted a new application.... Your credit report is one of the most important factors of your financial life. It contains a detailed history of your credit accounts including the date you opened the account, the current balance, and the payment history for the account.
Moments creating legal documents, some colorful splash with affiliated with pain for two South Pacific.
Step. Ask for permission in writing to run a credit check from the subject of the check. Alternately, you can ask the person to obtain a copy of his credit report and share it with you.
The federal Fair Credit Reporting Act (FCRA) specifies under what circumstances a credit report can be obtained and by whom. Access to credit reports is restricted to businesses with a specific need, and to consumers who request their own report.


text:
#ifndef MPT3SAS_BASE_H_INCLUDED
#define MPT3SAS_BASE_H_INCLUDED

#include "mpi/mpi2_type.h"
#include "mpi/mpi2.h"
#include "mpi/mpi2_ioc.h"
#include "mpi/mpi2_cnfg.h"
#include "mpi/mpi2_init.h"
#include "mpi/mpi2_raid.h"
#include "mpi/mpi2_tool.h"
#include "mpi/mpi2_sas.h"

#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport_sas.h>
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_eh.h>
#include <linux/pci.h>
#include <linux/poll.h>

#include "mpt3sas_debug.h"
#include "mpt3sas_trigger_diag.h"

/* driver versioning info */
#define MPT3SAS_DRIVER_NAME		"mpt3sas"
#define MPT3SAS_AUTHOR "Avago Technologies <MPT-FusionLinux.pdl@avagotech.com>"
#define MPT3SAS_DESCRIPTION	"LSI MPT Fusion SAS 3.0 Device Driver"
#define MPT3SAS_DRIVER_VERSION		"13.100.00.00"
#define MPT3SAS_MAJOR_VERSION		13
#define MPT3SAS_MINOR_VERSION		100
#define MPT3SAS_BUILD_VERSION		0
#define MPT3SAS_RELEASE_VERSION	00

#define MPT2SAS_DRIVER_NAME		"mpt2sas"
#define MPT2SAS_DESCRIPTION	"LSI MPT Fusion SAS 2.0 Device Driver"
#define MPT2SAS_DRIVER_VERSION		"20.102.00.00"
#define MPT2SAS_MAJOR_VERSION		20
#define MPT2SAS_MINOR_VERSION		102
#define MPT2SAS_BUILD_VERSION		0
#define MPT2SAS_RELEASE_VERSION	00

/*
 * Set MPT3SAS_SG_DEPTH value based on user input.
 */
#define MPT_MAX_PHYS_SEGMENTS	SG_CHUNK_SIZE
#define MPT_MIN_PHYS_SEGMENTS	16

#ifdef CONFIG_SCSI_MPT3SAS_MAX_SGE
#define MPT3SAS_SG_DEPTH		CONFIG_SCSI_MPT3SAS_MAX_SGE
#else
#define MPT3SAS_SG_DEPTH		MPT_MAX_PHYS_SEGMENTS
#endif

#ifdef CONFIG_SCSI_MPT2SAS_MAX_SGE
#define MPT2SAS_SG_DEPTH		CONFIG_SCSI_MPT2SAS_MAX_SGE
#else
#define MPT2SAS_SG_DEPTH		MPT_MAX_PHYS_SEGMENTS
#endif

/*
 * Generic Defines
 */
#define MPT3SAS_SATA_QUEUE_DEPTH	32
#define MPT3SAS_SAS_QUEUE_DEPTH		254
#define MPT3SAS_RAID_QUEUE_DEPTH	128

#define MPT3SAS_RAID_MAX_SECTORS	8192

#define MPT_NAME_LENGTH			32	/* generic length of strings */
#define MPT_STRING_LENGTH		64

#define MPT_MAX_CALLBACKS		32

#define	 CAN_SLEEP			1
#define  NO_SLEEP			0

#define INTERNAL_CMDS_COUNT		10	/* reserved cmds */
/* reserved for issuing internally framed scsi io cmds */
#define INTERNAL_SCSIIO_CMDS_COUNT	3

#define MPI3_HIM_MASK			0xFFFFFFFF /* mask every bit*/

#define MPT3SAS_INVALID_DEVICE_HANDLE	0xFFFF

#define MAX_CHAIN_ELEMT_SZ		16
#define DEFAULT_NUM_FWCHAIN_ELEMTS	8

/*
 * reset phases
 */
#define MPT3_IOC_PRE_RESET		1 /* prior to host reset */
#define MPT3_IOC_AFTER_RESET		2 /* just after host reset */
#define MPT3_IOC_DONE_RESET		3 /* links re-initialized */

/*
 * logging format
 */
#define MPT3SAS_FMT			"%s: "

/*
 *  WarpDrive Specific Log codes
 */

#define MPT2_WARPDRIVE_LOGENTRY		(0x8002)
#define MPT2_WARPDRIVE_LC_SSDT			(0x41)
#define MPT2_WARPDRIVE_LC_SSDLW		(0x43)
#define MPT2_WARPDRIVE_LC_SSDLF		(0x44)
#define MPT2_WARPDRIVE_LC_BRMF			(0x4D)

/*
 * per target private data
 */
#define MPT_TARGET_FLAGS_RAID_COMPONENT	0x01
#define MPT_TARGET_FLAGS_VOLUME		0x02
#define MPT_TARGET_FLAGS_DELETED	0x04
#define MPT_TARGET_FASTPATH_IO		0x08

#define SAS2_PCI_DEVICE_B0_REVISION	(0x01)
#define SAS3_PCI_DEVICE_C0_REVISION	(0x02)

/*
 * Intel HBA branding
 */
#define MPT2SAS_INTEL_RMS25JB080_BRANDING    \
	"Intel(R) Integrated RAID Module RMS25JB080"
#define MPT2SAS_INTEL_RMS25JB040_BRANDING    \
	"Intel(R) Integrated RAID Module RMS25JB040"
#define MPT2SAS_INTEL_RMS25KB080_BRANDING    \
	"Intel(R) Integrated RAID Module RMS25KB080"
#define MPT2SAS_INTEL_RMS25KB040_BRANDING    \
	"Intel(R) Integrated RAID Module RMS25KB040"
#define MPT2SAS_INTEL_RMS25LB040_BRANDING	\
	"Intel(R) Integrated RAID Module RMS25LB040"
#define MPT2SAS_INTEL_RMS25LB080_BRANDING	\
	"Intel(R) Integrated RAID Module RMS25LB080"
#define MPT2SAS_INTEL_RMS2LL080_BRANDING	\
	"Intel Integrated RAID Module RMS2LL080"
#define MPT2SAS_INTEL_RMS2LL040_BRANDING	\
	"Intel Integrated RAID Module RMS2LL040"
#define MPT2SAS_INTEL_RS25GB008_BRANDING       \
	"Intel(R) RAID Controller RS25GB008"
#define MPT2SAS_INTEL_SSD910_BRANDING          \
	"Intel(R) SSD 910 Series"

#define MPT3SAS_INTEL_RMS3JC080_BRANDING       \
	"Intel(R) Integrated RAID Module RMS3JC080"
#define MPT3SAS_INTEL_RS3GC008_BRANDING       \
	"Intel(R) RAID Controller RS3GC008"
#define MPT3SAS_INTEL_RS3FC044_BRANDING       \
	"Intel(R) RAID Controller RS3FC044"
#define MPT3SAS_INTEL_RS3UC080_BRANDING       \
	"Intel(R) RAID Controller RS3UC080"

/*
 * Intel HBA SSDIDs
 */
#define MPT2SAS_INTEL_RMS25JB080_SSDID		0x3516
#define MPT2SAS_INTEL_RMS25JB040_SSDID		0x3517
#define MPT2SAS_INTEL_RMS25KB080_SSDID		0x3518
#define MPT2SAS_INTEL_RMS25KB040_SSDID		0x3519
#define MPT2SAS_INTEL_RMS25LB040_SSDID		0x351A
#define MPT2SAS_INTEL_RMS25LB080_SSDID		0x351B
#define MPT2SAS_INTEL_RMS2LL080_SSDID		0x350E
#define MPT2SAS_INTEL_RMS2LL040_SSDID		0x350F
#define MPT2SAS_INTEL_RS25GB008_SSDID		0x3000
#define MPT2SAS_INTEL_SSD910_SSDID		0x3700

#define MPT3SAS_INTEL_RMS3JC080_SSDID		0x3521
#define MPT3SAS_INTEL_RS3GC008_SSDID		0x3522
#define MPT3SAS_INTEL_RS3FC044_SSDID		0x3523
#define MPT3SAS_INTEL_RS3UC080_SSDID		0x3524

/*
 * Dell HBA branding
 */
#define MPT2SAS_DELL_BRANDING_SIZE                 32

#define MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING        "Dell 6Gbps SAS HBA"
#define MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING    "Dell PERC H200 Adapter"
#define MPT2SAS_DELL_PERC_H200_INTEGRATED_BRANDING "Dell PERC H200 Integrated"
#define MPT2SAS_DELL_PERC_H200_MODULAR_BRANDING    "Dell PERC H200 Modular"
#define MPT2SAS_DELL_PERC_H200_EMBEDDED_BRANDING   "Dell PERC H200 Embedded"
#define MPT2SAS_DELL_PERC_H200_BRANDING            "Dell PERC H200"
#define MPT2SAS_DELL_6GBPS_SAS_BRANDING            "Dell 6Gbps SAS"

#define MPT3SAS_DELL_12G_HBA_BRANDING       \
	"Dell 12Gbps HBA"

/*
 * Dell HBA SSDIDs
 */
#define MPT2SAS_DELL_6GBPS_SAS_HBA_SSDID	0x1F1C
#define MPT2SAS_DELL_PERC_H200_ADAPTER_SSDID	0x1F1D
#define MPT2SAS_DELL_PERC_H200_INTEGRATED_SSDID	0x1F1E
#define MPT2SAS_DELL_PERC_H200_MODULAR_SSDID	0x1F1F
#define MPT2SAS_DELL_PERC_H200_EMBEDDED_SSDID	0x1F20
#define MPT2SAS_DELL_PERC_H200_SSDID		0x1F21
#define MPT2SAS_DELL_6GBPS_SAS_SSDID		0x1F22

#define MPT3SAS_DELL_12G_HBA_SSDID		0x1F46

/*
 * Cisco HBA branding
 */
#define MPT3SAS_CISCO_12G_8E_HBA_BRANDING		\
	"Cisco 9300-8E 12G SAS HBA"
#define MPT3SAS_CISCO_12G_8I_HBA_BRANDING		\
	"Cisco 9300-8i 12G SAS HBA"
#define MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING	\
	"Cisco 12G Modular SAS Pass through Controller"
#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING		\
	"UCS C3X60 12G SAS Pass through Controller"
/*
 * Cisco HBA SSSDIDs
 */
#define MPT3SAS_CISCO_12G_8E_HBA_SSDID  0x14C
#define MPT3SAS_CISCO_12G_8I_HBA_SSDID  0x154
#define MPT3SAS_CISCO_12G_AVILA_HBA_SSDID  0x155
#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID  0x156

/*
 * status bits for ioc->diag_buffer_status
 */
#define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
#define MPT3_DIAG_BUFFER_IS_RELEASED	(0x02)
#define MPT3_DIAG_BUFFER_IS_DIAG_RESET	(0x04)

/*
 * HP HBA branding
 */
#define MPT2SAS_HP_3PAR_SSVID                0x1590

#define MPT2SAS_HP_2_4_INTERNAL_BRANDING	\
	"HP H220 Host Bus Adapter"
#define MPT2SAS_HP_2_4_EXTERNAL_BRANDING	\
	"HP H221 Host Bus Adapter"
#define MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_BRANDING	\
	"HP H222 Host Bus Adapter"
#define MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_BRANDING	\
	"HP H220i Host Bus Adapter"
#define MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_BRANDING	\
	"HP H210i Host Bus Adapter"

/*
 * HO HBA SSDIDs
 */
#define MPT2SAS_HP_2_4_INTERNAL_SSDID			0x0041
#define MPT2SAS_HP_2_4_EXTERNAL_SSDID			0x0042
#define MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_SSDID	0x0043
#define MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_SSDID		0x0044
#define MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_SSDID		0x0046

/*
 * Combined Reply Queue constants,
 * There are twelve Supplemental Reply Post Host Index Registers
 * and each register is at offset 0x10 bytes from the previous one.
 */
#define MPT3_SUP_REPLY_POST_HOST_INDEX_REG_COUNT 12
#define MPT3_SUP_REPLY_POST_HOST_INDEX_REG_OFFSET (0x10)

/* OEM Identifiers */
#define MFG10_OEM_ID_INVALID                   (0x00000000)
#define MFG10_OEM_ID_DELL                      (0x00000001)
#define MFG10_OEM_ID_FSC                       (0x00000002)
#define MFG10_OEM_ID_SUN                       (0x00000003)
#define MFG10_OEM_ID_IBM                       (0x00000004)

/* GENERIC Flags 0*/
#define MFG10_GF0_OCE_DISABLED                 (0x00000001)
#define MFG10_GF0_R1E_DRIVE_COUNT              (0x00000002)
#define MFG10_GF0_R10_DISPLAY                  (0x00000004)
#define MFG10_GF0_SSD_DATA_SCRUB_DISABLE       (0x00000008)
#define MFG10_GF0_SINGLE_DRIVE_R0              (0x00000010)

#define VIRTUAL_IO_FAILED_RETRY			(0x32010081)

/* OEM Specific Flags will come from OEM specific header files */
struct Mpi2ManufacturingPage10_t {
	MPI2_CONFIG_PAGE_HEADER	Header;		/* 00h */
	U8	OEMIdentifier;			/* 04h */
	U8	Reserved1;			/* 05h */
	U16	Reserved2;			/* 08h */
	U32	Reserved3;			/* 0Ch */
	U32	GenericFlags0;			/* 10h */
	U32	GenericFlags1;			/* 14h */
	U32	Reserved4;			/* 18h */
	U32	OEMSpecificFlags0;		/* 1Ch */
	U32	OEMSpecificFlags1;		/* 20h */
	U32	Reserved5[18];			/* 24h - 60h*/
};

/* Miscellaneous options */
struct Mpi2ManufacturingPage11_t {
	MPI2_CONFIG_PAGE_HEADER Header;		/* 00h */
	__le32	Reserved1;			/* 04h */
	u8	Reserved2;			/* 08h */
	u8	EEDPTagMode;			/* 09h */
	u8	Reserved3;			/* 0Ah */
	u8	Reserved4;			/* 0Bh */
	__le32	Reserved5[23];			/* 0Ch-60h*/
};

/**
 * struct MPT3SAS_TARGET - starget private hostdata
 * @starget: starget object
 * @sas_address: target sas address
 * @raid_device: raid_device pointer to access volume data
 * @handle: device handle
 * @num_luns: number luns
 * @flags: MPT_TARGET_FLAGS_XXX flags
 * @deleted: target flaged for deletion
 * @tm_busy: target is busy with TM request.
 * @sdev: The sas_device associated with this target
 */
struct MPT3SAS_TARGET {
	struct scsi_target *starget;
	u64	sas_address;
	struct _raid_device *raid_device;
	u16	handle;
	int	num_luns;
	u32	flags;
	u8	deleted;
	u8	tm_busy;
	struct _sas_device *sdev;
};

/*
 * per device private data
 */
#define MPT_DEVICE_FLAGS_INIT		0x01
#define MPT_DEVICE_TLR_ON		0x02

#define MFG_PAGE10_HIDE_SSDS_MASK	(0x00000003)
#define MFG_PAGE10_HIDE_ALL_DISKS	(0x00)
#define MFG_PAGE10_EXPOSE_ALL_DISKS	(0x01)
#define MFG_PAGE10_HIDE_IF_VOL_PRESENT	(0x02)

/**
 * struct MPT3SAS_DEVICE - sdev private hostdata
 * @sas_target: starget private hostdata
 * @lun: lun number
 * @flags: MPT_DEVICE_XXX flags
 * @configured_lun: lun is configured
 * @block: device is in SDEV_BLOCK state
 * @tlr_snoop_check: flag used in determining whether to disable TLR
 * @eedp_enable: eedp support enable bit
 * @eedp_type: 0(type_1), 1(type_2), 2(type_3)
 * @eedp_block_length: block size
 */
struct MPT3SAS_DEVICE {
	struct MPT3SAS_TARGET *sas_target;
	unsigned int	lun;
	u32	flags;
	u8	configured_lun;
	u8	block;
	u8	tlr_snoop_check;
	u8	ignore_delay_remove;
};

#define MPT3_CMD_NOT_USED	0x8000	/* free */
#define MPT3_CMD_COMPLETE	0x0001	/* completed */
#define MPT3_CMD_PENDING	0x0002	/* pending */
#define MPT3_CMD_REPLY_VALID	0x0004	/* reply is valid */
#define MPT3_CMD_RESET		0x0008	/* host reset dropped the command */

/**
 * struct _internal_cmd - internal commands struct
 * @mutex: mutex
 * @done: completion
 * @reply: reply message pointer
 * @sense: sense data
 * @status: MPT3_CMD_XXX status
 * @smid: system message id
 */
struct _internal_cmd {
	struct mutex mutex;
	struct completion done;
	void	*reply;
	void	*sense;
	u16	status;
	u16	smid;
};

/**
 * struct _sas_device - attached device information
 * @list: sas device list
 * @starget: starget object
 * @sas_address: device sas address
 * @device_name: retrieved from the SAS IDENTIFY frame.
 * @handle: device handle
 * @sas_address_parent: sas address of parent expander or sas host
 * @enclosure_handle: enclosure handle
 * @enclosure_logical_id: enclosure logical identifier
 * @volume_handle: volume handle (valid when hidden raid member)
 * @volume_wwid: volume unique identifier
 * @device_info: bitfield provides detailed info about the device
 * @id: target id
 * @channel: target channel
 * @slot: number number
 * @phy: phy identifier provided in sas device page 0
 * @responding: used in _scsih_sas_device_mark_responding
 * @fast_path: fast path feature enable bit
 * @pfa_led_on: flag for PFA LED status
 * @pend_sas_rphy_add: flag to check if device is in sas_rphy_add()
 *	addition routine.
 */
struct _sas_device {
	struct list_head list;
	struct scsi_target *starget;
	u64	sas_address;
	u64	device_name;
	u16	handle;
	u64	sas_address_parent;
	u16	enclosure_handle;
	u64	enclosure_logical_id;
	u16	volume_handle;
	u64	volume_wwid;
	u32	device_info;
	int	id;
	int	channel;
	u16	slot;
	u8	phy;
	u8	responding;
	u8	fast_path;
	u8	pfa_led_on;
	u8	pend_sas_rphy_add;
	u8	enclosure_level;
	u8	connector_name[4];
	struct kref refcount;
};

static inline void sas_device_get(struct _sas_device *s)
{
	kref_get(&s->refcount);
}

static inline void sas_device_free(struct kref *r)
{
	kfree(container_of(r, struct _sas_device, refcount));
}

static inline void sas_device_put(struct _sas_device *s)
{
	kref_put(&s->refcount, sas_device_free);
}

/**
 * struct _raid_device - raid volume link list
 * @list: sas device list
 * @starget: starget object
 * @sdev: scsi device struct (volumes are single lun)
 * @wwid: unique identifier for the volume
 * @handle: device handle
 * @block_size: Block size of the volume
 * @id: target id
 * @channel: target channel
 * @volume_type: the raid level
 * @device_info: bitfield provides detailed info about the hidden components
 * @num_pds: number of hidden raid components
 * @responding: used in _scsih_raid_device_mark_responding
 * @percent_complete: resync percent complete
 * @direct_io_enabled: Whether direct io to PDs are allowed or not
 * @stripe_exponent: X where 2powX is the stripe sz in blocks
 * @block_exponent: X where 2powX is the block sz in bytes
 * @max_lba: Maximum number of LBA in the volume
 * @stripe_sz: Stripe Size of the volume
 * @device_info: Device info of the volume member disk
 * @pd_handle: Array of handles of the physical drives for direct I/O in le16
 */
#define MPT_MAX_WARPDRIVE_PDS		8
struct _raid_device {
	struct list_head list;
	struct scsi_target *starget;
	struct scsi_device *sdev;
	u64	wwid;
	u16	handle;
	u16	block_sz;
	int	id;
	int	channel;
	u8	volume_type;
	u8	num_pds;
	u8	responding;
	u8	percent_complete;
	u8	direct_io_enabled;
	u8	stripe_exponent;
	u8	block_exponent;
	u64	max_lba;
	u32	stripe_sz;
	u32	device_info;
	u16	pd_handle[MPT_MAX_WARPDRIVE_PDS];
};

/**
 * struct _boot_device - boot device info
 * @is_raid: flag to indicate whether this is volume
 * @device: holds pointer for either struct _sas_device or
 *     struct _raid_device
 */
struct _boot_device {
	u8 is_raid;
	void *device;
};

/**
 * struct _sas_port - wide/narrow sas port information
 * @port_list: list of ports belonging to expander
 * @num_phys: number of phys belonging to this port
 * @remote_identify: attached device identification
 * @rphy: sas transport rphy object
 * @port: sas transport wide/narrow port object
 * @phy_list: _sas_phy list objects belonging to this port
 */
struct _sas_port {
	struct list_head port_list;
	u8	num_phys;
	struct sas_identify remote_identify;
	struct sas_rphy *rphy;
	struct sas_port *port;
	struct list_head phy_list;
};

/**
 * struct _sas_phy - phy information
 * @port_siblings: list of phys belonging to a port
 * @identify: phy identification
 * @remote_identify: attached device identification
 * @phy: sas transport phy object
 * @phy_id: unique phy id
 * @handle: device handle for this phy
 * @attached_handle: device handle for attached device
 * @phy_belongs_to_port: port has been created for this phy
 */
struct _sas_phy {
	struct list_head port_siblings;
	struct sas_identify identify;
	struct sas_identify remote_identify;
	struct sas_phy *phy;
	u8	phy_id;
	u16	handle;
	u16	attached_handle;
	u8	phy_belongs_to_port;
};

/**
 * struct _sas_node - sas_host/expander information
 * @list: list of expanders
 * @parent_dev: parent device class
 * @num_phys: number phys belonging to this sas_host/expander
 * @sas_address: sas address of this sas_host/expander
 * @handle: handle for this sas_host/expander
 * @sas_address_parent: sas address of parent expander or sas host
 * @enclosure_handle: handle for this a member of an enclosure
 * @device_info: bitwise defining capabilities of this sas_host/expander
 * @responding: used in _scsih_expander_device_mark_responding
 * @phy: a list of phys that make up this sas_host/expander
 * @sas_port_list: list of ports attached to this sas_host/expander
 */
struct _sas_node {
	struct list_head list;
	struct device *parent_dev;
	u8	num_phys;
	u64	sas_address;
	u16	handle;
	u64	sas_address_parent;
	u16	enclosure_handle;
	u64	enclosure_logical_id;
	u8	responding;
	struct	_sas_phy *phy;
	struct list_head sas_port_list;
};

/**
 * enum reset_type - reset state
 * @FORCE_BIG_HAMMER: issue diagnostic reset
 * @SOFT_RESET: issue message_unit_reset, if fails to to big hammer
 */
enum reset_type {
	FORCE_BIG_HAMMER,
	SOFT_RESET,
};

/**
 * struct chain_tracker - firmware chain tracker
 * @chain_buffer: chain buffer
 * @chain_buffer_dma: physical address
 * @tracker_list: list of free request (ioc->free_chain_list)
 */
struct chain_tracker {
	void *chain_buffer;
	dma_addr_t chain_buffer_dma;
	struct list_head tracker_list;
};

/**
 * struct scsiio_tracker - scsi mf request tracker
 * @smid: system message id
 * @scmd: scsi request pointer
 * @cb_idx: callback index
 * @direct_io: To indicate whether I/O is direct (WARPDRIVE)
 * @tracker_list: list of free request (ioc->free_list)
 * @msix_io: IO's msix
 */
struct scsiio_tracker {
	u16	smid;
	struct scsi_cmnd *scmd;
	u8	cb_idx;
	u8	direct_io;
	struct list_head chain_list;
	struct list_head tracker_list;
	u16     msix_io;
};

/**
 * struct request_tracker - firmware request tracker
 * @smid: system message id
 * @cb_idx: callback index
 * @tracker_list: list of free request (ioc->free_list)
 */
struct request_tracker {
	u16	smid;
	u8	cb_idx;
	struct list_head tracker_list;
};

/**
 * struct _tr_list - target reset list
 * @handle: device handle
 * @state: state machine
 */
struct _tr_list {
	struct list_head list;
	u16	handle;
	u16	state;
};

/**
 * struct _sc_list - delayed SAS_IO_UNIT_CONTROL message list
 * @handle: device handle
 */
struct _sc_list {
	struct list_head list;
	u16     handle;
};

/**
 * struct _event_ack_list - delayed event acknowledgment list
 * @Event: Event ID
 * @EventContext: used to track the event uniquely
 */
struct _event_ack_list {
	struct list_head list;
	u16     Event;
	u32     EventContext;
};

/**
 * struct adapter_reply_queue - the reply queue struct
 * @ioc: per adapter object
 * @msix_index: msix index into vector table
 * @vector: irq vector
 * @reply_post_host_index: head index in the pool where FW completes IO
 * @reply_post_free: reply post base virt address
 * @name: the name registered to request_irq()
 * @busy: isr is actively processing replies on another cpu
 * @list: this list
*/
struct adapter_reply_queue {
	struct MPT3SAS_ADAPTER	*ioc;
	u8			msix_index;
	unsigned int		vector;
	u32			reply_post_host_index;
	Mpi2ReplyDescriptorsUnion_t *reply_post_free;
	char			name[MPT_NAME_LENGTH];
	atomic_t		busy;
	cpumask_var_t		affinity_hint;
	struct list_head	list;
};

typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);

/* SAS3.0 support */
typedef int (*MPT_BUILD_SG_SCMD)(struct MPT3SAS_ADAPTER *ioc,
		struct scsi_cmnd *scmd, u16 smid);
typedef void (*MPT_BUILD_SG)(struct MPT3SAS_ADAPTER *ioc, void *psge,
		dma_addr_t data_out_dma, size_t data_out_sz,
		dma_addr_t data_in_dma, size_t data_in_sz);
typedef void (*MPT_BUILD_ZERO_LEN_SGE)(struct MPT3SAS_ADAPTER *ioc,
		void *paddr);

/* IOC Facts and Port Facts converted from little endian to cpu */
union mpi3_version_union {
	MPI2_VERSION_STRUCT		Struct;
	u32				Word;
};

struct mpt3sas_facts {
	u16			MsgVersion;
	u16			HeaderVersion;
	u8			IOCNumber;
	u8			VP_ID;
	u8			VF_ID;
	u16			IOCExceptions;
	u16			IOCStatus;
	u32			IOCLogInfo;
	u8			MaxChainDepth;
	u8			WhoInit;
	u8			NumberOfPorts;
	u8			MaxMSIxVectors;
	u16			RequestCredit;
	u16			ProductID;
	u32			IOCCapabilities;
	union mpi3_version_union	FWVersion;
	u16			IOCRequestFrameSize;
	u16			IOCMaxChainSegmentSize;
	u16			MaxInitiators;
	u16			MaxTargets;
	u16			MaxSasExpanders;
	u16			MaxEnclosures;
	u16			ProtocolFlags;
	u16			HighPriorityCredit;
	u16			MaxReplyDescriptorPostQueueDepth;
	u8			ReplyFrameSize;
	u8			MaxVolumes;
	u16			MaxDevHandle;
	u16			MaxPersistentEntries;
	u16			MinDevHandle;
};

struct mpt3sas_port_facts {
	u8			PortNumber;
	u8			VP_ID;
	u8			VF_ID;
	u8			PortType;
	u16			MaxPostedCmdBuffers;
};

struct reply_post_struct {
	Mpi2ReplyDescriptorsUnion_t	*reply_post_free;
	dma_addr_t			reply_post_free_dma;
};

/**
 * enum mutex_type - task management mutex type
 * @TM_MUTEX_OFF: mutex is not required becuase calling function is acquiring it
 * @TM_MUTEX_ON: mutex is required
 */
enum mutex_type {
	TM_MUTEX_OFF = 0,
	TM_MUTEX_ON = 1,
};

typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
/**
 * struct MPT3SAS_ADAPTER - per adapter struct
 * @list: ioc_list
 * @shost: shost object
 * @id: unique adapter id
 * @cpu_count: number online cpus
 * @name: generic ioc string
 * @tmp_string: tmp string used for logging
 * @pdev: pci pdev object
 * @pio_chip: physical io register space
 * @chip: memory mapped register space
 * @chip_phys: physical addrss prior to mapping
 * @logging_level: see mpt3sas_debug.h
 * @fwfault_debug: debuging FW timeouts
 * @ir_firmware: IR firmware present
 * @bars: bitmask of BAR's that must be configured
 * @mask_interrupts: ignore interrupt
 * @dma_mask: used to set the consistent dma mask
 * @fault_reset_work_q_name: fw fault work queue
 * @fault_reset_work_q: ""
 * @fault_reset_work: ""
 * @firmware_event_name: fw event work queue
 * @firmware_event_thread: ""
 * @fw_event_lock:
 * @fw_event_list: list of fw events
 * @aen_event_read_flag: event log was read
 * @broadcast_aen_busy: broadcast aen waiting to be serviced
 * @shost_recovery: host reset in progress
 * @ioc_reset_in_progress_lock:
 * @ioc_link_reset_in_progress: phy/hard reset in progress
 * @ignore_loginfos: ignore loginfos during task management
 * @remove_host: flag for when driver unloads, to avoid sending dev resets
 * @pci_error_recovery: flag to prevent ioc access until slot reset completes
 * @wait_for_discovery_to_complete: flag set at driver load time when
 *                                               waiting on reporting devices
 * @is_driver_loading: flag set at driver load time
 * @port_enable_failed: flag set when port enable has failed
 * @start_scan: flag set from scan_start callback, cleared from _mpt3sas_fw_work
 * @start_scan_failed: means port enable failed, return's the ioc_status
 * @msix_enable: flag indicating msix is enabled
 * @msix_vector_count: number msix vectors
 * @cpu_msix_table: table for mapping cpus to msix index
 * @cpu_msix_table_sz: table size
 * @schedule_dead_ioc_flush_running_cmds: callback to flush pending commands
 * @scsi_io_cb_idx: shost generated commands
 * @tm_cb_idx: task management commands
 * @scsih_cb_idx: scsih internal commands
 * @transport_cb_idx: transport internal commands
 * @ctl_cb_idx: clt internal commands
 * @base_cb_idx: base internal commands
 * @config_cb_idx: base internal commands
 * @tm_tr_cb_idx : device removal target reset handshake
 * @tm_tr_volume_cb_idx : volume removal target reset
 * @base_cmds:
 * @transport_cmds:
 * @scsih_cmds:
 * @tm_cmds:
 * @ctl_cmds:
 * @config_cmds:
 * @base_add_sg_single: handler for either 32/64 bit sgl's
 * @event_type: bits indicating which events to log
 * @event_context: unique id for each logged event
 * @event_log: event log pointer
 * @event_masks: events that are masked
 * @facts: static facts data
 * @pfacts: static port facts data
 * @manu_pg0: static manufacturing page 0
 * @manu_pg10: static manufacturing page 10
 * @manu_pg11: static manufacturing page 11
 * @bios_pg2: static bios page 2
 * @bios_pg3: static bios page 3
 * @ioc_pg8: static ioc page 8
 * @iounit_pg0: static iounit page 0
 * @iounit_pg1: static iounit page 1
 * @iounit_pg8: static iounit page 8
 * @sas_hba: sas host object
 * @sas_expander_list: expander object list
 * @sas_node_lock:
 * @sas_device_list: sas device object list
 * @sas_device_init_list: sas device object list (used only at init time)
 * @sas_device_lock:
 * @io_missing_delay: time for IO completed by fw when PDR enabled
 * @device_missing_delay: time for device missing by fw when PDR enabled
 * @sas_id : used for setting volume target IDs
 * @blocking_handles: bitmask used to identify which devices need blocking
 * @pd_handles : bitmask for PD handles
 * @pd_handles_sz : size of pd_handle bitmask
 * @config_page_sz: config page size
 * @config_page: reserve memory for config page payload
 * @config_page_dma:
 * @hba_queue_depth: hba request queue depth
 * @sge_size: sg element size for either 32/64 bit
 * @scsiio_depth: SCSI_IO queue depth
 * @request_sz: per request frame size
 * @request: pool of request frames
 * @request_dma:
 * @request_dma_sz:
 * @scsi_lookup: firmware request tracker list
 * @scsi_lookup_lock:
 * @free_list: free list of request
 * @pending_io_count:
 * @reset_wq:
 * @chain: pool of chains
 * @chain_dma:
 * @max_sges_in_main_message: number sg elements in main message
 * @max_sges_in_chain_message: number sg elements per chain
 * @chains_needed_per_io: max chains per io
 * @chain_depth: total chains allocated
 * @chain_segment_sz: gives the max number of
 *			SGEs accommodate on single chain buffer
 * @hi_priority_smid:
 * @hi_priority:
 * @hi_priority_dma:
 * @hi_priority_depth:
 * @hpr_lookup:
 * @hpr_free_list:
 * @internal_smid:
 * @internal:
 * @internal_dma:
 * @internal_depth:
 * @internal_lookup:
 * @internal_free_list:
 * @sense: pool of sense
 * @sense_dma:
 * @sense_dma_pool:
 * @reply_depth: hba reply queue depth:
 * @reply_sz: per reply frame size:
 * @reply: pool of replys:
 * @reply_dma:
 * @reply_dma_pool:
 * @reply_free_queue_depth: reply free depth
 * @reply_free: pool for reply free queue (32 bit addr)
 * @reply_free_dma:
 * @reply_free_dma_pool:
 * @reply_free_host_index: tail index in pool to insert free replys
 * @reply_post_queue_depth: reply post queue depth
 * @reply_post_struct: struct for reply_post_free physical & virt address
 * @rdpq_array_capable: FW supports multiple reply queue addresses in ioc_init
 * @rdpq_array_enable: rdpq_array support is enabled in the driver
 * @rdpq_array_enable_assigned: this ensures that rdpq_array_enable flag
 *				is assigned only ones
 * @reply_queue_count: number of reply queue's
 * @reply_queue_list: link list contaning the reply queue info
 * @msix96_vector: 96 MSI-X vector support
 * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
 * @delayed_tr_list: target reset link list
 * @delayed_tr_volume_list: volume target reset link list
 * @delayed_sc_list:
 * @delayed_event_ack_list:
 * @temp_sensors_count: flag to carry the number of temperature sensors
 * @pci_access_mutex: Mutex to synchronize ioctl,sysfs show path and
 *	pci resource handling. PCI resource freeing will lead to free
 *	vital hardware/memory resource, which might be in use by cli/sysfs
 *	path functions resulting in Null pointer reference followed by kernel
 *	crash. To avoid the above race condition we use mutex syncrhonization
 *	which ensures the syncrhonization between cli/sysfs_show path.
 */
struct MPT3SAS_ADAPTER {
	struct list_head list;
	struct Scsi_Host *shost;
	u8		id;
	int		cpu_count;
	char		name[MPT_NAME_LENGTH];
	char		driver_name[MPT_NAME_LENGTH];
	char		tmp_string[MPT_STRING_LENGTH];
	struct pci_dev	*pdev;
	Mpi2SystemInterfaceRegs_t __iomem *chip;
	resource_size_t	chip_phys;
	int		logging_level;
	int		fwfault_debug;
	u8		ir_firmware;
	int		bars;
	u8		mask_interrupts;
	int		dma_mask;

	/* fw fault handler */
	char		fault_reset_work_q_name[20];
	struct workqueue_struct *fault_reset_work_q;
	struct delayed_work fault_reset_work;

	/* fw event handler */
	char		firmware_event_name[20];
	struct workqueue_struct	*firmware_event_thread;
	spinlock_t	fw_event_lock;
	struct list_head fw_event_list;

	 /* misc flags */
	int		aen_event_read_flag;
	u8		broadcast_aen_busy;
	u16		broadcast_aen_pending;
	u8		shost_recovery;

	struct mutex	reset_in_progress_mutex;
	spinlock_t	ioc_reset_in_progress_lock;
	u8		ioc_link_reset_in_progress;
	u8		ioc_reset_in_progress_status;

	u8		ignore_loginfos;
	u8		remove_host;
	u8		pci_error_recovery;
	u8		wait_for_discovery_to_complete;
	u8		is_driver_loading;
	u8		port_enable_failed;
	u8		start_scan;
	u16		start_scan_failed;

	u8		msix_enable;
	u16		msix_vector_count;
	u8		*cpu_msix_table;
	u16		cpu_msix_table_sz;
	resource_size_t __iomem **reply_post_host_index;
	u32		ioc_reset_count;
	MPT3SAS_FLUSH_RUNNING_CMDS schedule_dead_ioc_flush_running_cmds;
	u32             non_operational_loop;

	/* internal commands, callback index */
	u8		scsi_io_cb_idx;
	u8		tm_cb_idx;
	u8		transport_cb_idx;
	u8		scsih_cb_idx;
	u8		ctl_cb_idx;
	u8		base_cb_idx;
	u8		port_enable_cb_idx;
	u8		config_cb_idx;
	u8		tm_tr_cb_idx;
	u8		tm_tr_volume_cb_idx;
	u8		tm_sas_control_cb_idx;
	struct _internal_cmd base_cmds;
	struct _internal_cmd port_enable_cmds;
	struct _internal_cmd transport_cmds;
	struct _internal_cmd scsih_cmds;
	struct _internal_cmd tm_cmds;
	struct _internal_cmd ctl_cmds;
	struct _internal_cmd config_cmds;

	MPT_ADD_SGE	base_add_sg_single;

	/* function ptr for either IEEE or MPI sg elements */
	MPT_BUILD_SG_SCMD build_sg_scmd;
	MPT_BUILD_SG    build_sg;
	MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge;
	u16             sge_size_ieee;
	u16		hba_mpi_version_belonged;

	/* function ptr for MPI sg elements only */
	MPT_BUILD_SG    build_sg_mpi;
	MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge_mpi;

	/* event log */
	u32		event_type[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];
	u32		event_context;
	void		*event_log;
	u32		event_masks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];

	/* static config pages */
	struct mpt3sas_facts facts;
	struct mpt3sas_port_facts *pfacts;
	Mpi2ManufacturingPage0_t manu_pg0;
	struct Mpi2ManufacturingPage10_t manu_pg10;
	struct Mpi2ManufacturingPage11_t manu_pg11;
	Mpi2BiosPage2_t	bios_pg2;
	Mpi2BiosPage3_t	bios_pg3;
	Mpi2IOCPage8_t ioc_pg8;
	Mpi2IOUnitPage0_t iounit_pg0;
	Mpi2IOUnitPage1_t iounit_pg1;
	Mpi2IOUnitPage8_t iounit_pg8;

	struct _boot_device req_boot_device;
	struct _boot_device req_alt_boot_device;
	struct _boot_device current_boot_device;

	/* sas hba, expander, and device list */
	struct _sas_node sas_hba;
	struct list_head sas_expander_list;
	spinlock_t	sas_node_lock;
	struct list_head sas_device_list;
	struct list_head sas_device_init_list;
	spinlock_t	sas_device_lock;
	struct list_head raid_device_list;
	spinlock_t	raid_device_lock;
	u8		io_missing_delay;
	u16		device_missing_delay;
	int		sas_id;

	void		*blocking_handles;
	void		*pd_handles;
	u16		pd_handles_sz;

	/* config page */
	u16		config_page_sz;
	void		*config_page;
	dma_addr_t	config_page_dma;

	/* scsiio request */
	u16		hba_queue_depth;
	u16		sge_size;
	u16		scsiio_depth;
	u16		request_sz;
	u8		*request;
	dma_addr_t	request_dma;
	u32		request_dma_sz;
	struct scsiio_tracker *scsi_lookup;
	ulong		scsi_lookup_pages;
	spinlock_t	scsi_lookup_lock;
	struct list_head free_list;
	int		pending_io_count;
	wait_queue_head_t reset_wq;

	/* chain */
	struct chain_tracker *chain_lookup;
	struct list_head free_chain_list;
	struct dma_pool *chain_dma_pool;
	ulong		chain_pages;
	u16		max_sges_in_main_message;
	u16		max_sges_in_chain_message;
	u16		chains_needed_per_io;
	u32		chain_depth;
	u16		chain_segment_sz;

	/* hi-priority queue */
	u16		hi_priority_smid;
	u8		*hi_priority;
	dma_addr_t	hi_priority_dma;
	u16		hi_priority_depth;
	struct request_tracker *hpr_lookup;
	struct list_head hpr_free_list;

	/* internal queue */
	u16		internal_smid;
	u8		*internal;
	dma_addr_t	internal_dma;
	u16		internal_depth;
	struct request_tracker *internal_lookup;
	struct list_head internal_free_list;

	/* sense */
	u8		*sense;
	dma_addr_t	sense_dma;
	struct dma_pool *sense_dma_pool;

	/* reply */
	u16		reply_sz;
	u8		*reply;
	dma_addr_t	reply_dma;
	u32		reply_dma_max_address;
	u32		reply_dma_min_address;
	struct dma_pool *reply_dma_pool;

	/* reply free queue */
	u16		reply_free_queue_depth;
	__le32		*reply_free;
	dma_addr_t	reply_free_dma;
	struct dma_pool *reply_free_dma_pool;
	u32		reply_free_host_index;

	/* reply post queue */
	u16		reply_post_queue_depth;
	struct reply_post_struct *reply_post;
	u8		rdpq_array_capable;
	u8		rdpq_array_enable;
	u8		rdpq_array_enable_assigned;
	struct dma_pool *reply_post_free_dma_pool;
	u8		reply_queue_count;
	struct list_head reply_queue_list;

	u8		msix96_vector;
	/* reply post register index */
	resource_size_t	**replyPostRegisterIndex;

	struct list_head delayed_tr_list;
	struct list_head delayed_tr_volume_list;
	struct list_head delayed_sc_list;
	struct list_head delayed_event_ack_list;
	u8		temp_sensors_count;
	struct mutex pci_access_mutex;

	/* diag buffer support */
	u8		*diag_buffer[MPI2_DIAG_BUF_TYPE_COUNT];
	u32		diag_buffer_sz[MPI2_DIAG_BUF_TYPE_COUNT];
	dma_addr_t	diag_buffer_dma[MPI2_DIAG_BUF_TYPE_COUNT];
	u8		diag_buffer_status[MPI2_DIAG_BUF_TYPE_COUNT];
	u32		unique_id[MPI2_DIAG_BUF_TYPE_COUNT];
	u32		product_specific[MPI2_DIAG_BUF_TYPE_COUNT][23];
	u32		diagnostic_flags[MPI2_DIAG_BUF_TYPE_COUNT];
	u32		ring_buffer_offset;
	u32		ring_buffer_sz;
	u8		is_warpdrive;
	u8		hide_ir_msg;
	u8		mfg_pg10_hide_flag;
	u8		hide_drives;
	spinlock_t	diag_trigger_lock;
	u8		diag_trigger_active;
	struct SL_WH_MASTER_TRIGGER_T diag_trigger_master;
	struct SL_WH_EVENT_TRIGGERS_T diag_trigger_event;
	struct SL_WH_SCSI_TRIGGERS_T diag_trigger_scsi;
	struct SL_WH_MPI_TRIGGERS_T diag_trigger_mpi;
};

typedef u8 (*MPT_CALLBACK)(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
	u32 reply);

/* base shared API */
extern struct list_head mpt3sas_ioc_list;
extern char    driver_name[MPT_NAME_LENGTH];
/* spinlock on list operations over IOCs
 * Case: when multiple warpdrive cards(IOCs) are in use
 * Each IOC will added to the ioc list structure on initialization.
 * Watchdog threads run at regular intervals to check IOC for any
 * fault conditions which will trigger the dead_ioc thread to
 * deallocate pci resource, resulting deleting the IOC netry from list,
 * this deletion need to protected by spinlock to enusre that
 * ioc removal is syncrhonized, if not synchronized it might lead to
 * list_del corruption as the ioc list is traversed in cli path.
 */
extern spinlock_t gioc_lock;

void mpt3sas_base_start_watchdog(struct MPT3SAS_ADAPTER *ioc);
void mpt3sas_base_stop_watchdog(struct MPT3SAS_ADAPTER *ioc);

int mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc);
void mpt3sas_base_detach(struct MPT3SAS_ADAPTER *ioc);
int mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc);
void mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc);
int mpt3sas_base_hard_reset_handler(struct MPT3SAS_ADAPTER *ioc, int sleep_flag,
	enum reset_type type);

void *mpt3sas_base_get_msg_frame(struct MPT3SAS_ADAPTER *ioc, u16 smid);
void *mpt3sas_base_get_sense_buffer(struct MPT3SAS_ADAPTER *ioc, u16 smid);
__le32 mpt3sas_base_get_sense_buffer_dma(struct MPT3SAS_ADAPTER *ioc,
	u16 smid);

void mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc);

/* hi-priority queue */
u16 mpt3sas_base_get_smid_hpr(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx);
u16 mpt3sas_base_get_smid_scsiio(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx,
	struct scsi_cmnd *scmd);

u16 mpt3sas_base_get_smid(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx);
void mpt3sas_base_free_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid);
void mpt3sas_base_put_smid_scsi_io(struct MPT3SAS_ADAPTER *ioc, u16 smid,
	u16 handle);
void mpt3sas_base_put_smid_fast_path(struct MPT3SAS_ADAPTER *ioc, u16 smid,
	u16 handle);
void mpt3sas_base_put_smid_hi_priority(struct MPT3SAS_ADAPTER *ioc,
	u16 smid, u16 msix_task);
void mpt3sas_base_put_smid_default(struct MPT3SAS_ADAPTER *ioc, u16 smid);
void mpt3sas_base_initialize_callback_handler(void);
u8 mpt3sas_base_register_callback_handler(MPT_CALLBACK cb_func);
void mpt3sas_base_release_callback_handler(u8 cb_idx);

u8 mpt3sas_base_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
	u32 reply);
u8 mpt3sas_port_enable_done(struct MPT3SAS_ADAPTER *ioc, u16 smid,
	u8 msix_index, u32 reply);
void *mpt3sas_base_get_reply_virt_addr(struct MPT3SAS_ADAPTER *ioc,
	u32 phys_addr);

u32 mpt3sas_base_get_iocstate(struct MPT3SAS_ADAPTER *ioc, int cooked);

void mpt3sas_base_fault_info(struct MPT3SAS_ADAPTER *ioc , u16 fault_code);
int mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc,
	Mpi2SasIoUnitControlReply_t *mpi_reply,
	Mpi2SasIoUnitControlRequest_t *mpi_request);
int mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc,
	Mpi2SepReply_t *mpi_reply, Mpi2SepRequest_t *mpi_request);

void mpt3sas_base_validate_event_type(struct MPT3SAS_ADAPTER *ioc,
	u32 *event_type);

void mpt3sas_halt_firmware(struct MPT3SAS_ADAPTER *ioc);

void mpt3sas_base_update_missing_delay(struct MPT3SAS_ADAPTER *ioc,
	u16 device_missing_delay, u8 io_missing_delay);

int mpt3sas_port_enable(struct MPT3SAS_ADAPTER *ioc);

/* scsih shared API */
u8 mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index,
	u32 reply);
void mpt3sas_scsih_reset_handler(struct MPT3SAS_ADAPTER *ioc, int reset_phase);

int mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle,
	uint channel, uint id, uint lun, u8 type, u16 smid_task,
	ulong timeout, enum mutex_type m_type);
void mpt3sas_scsih_set_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle);
void mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle);
void mpt3sas_expander_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address);
void mpt3sas_device_remove_by_sas_address(struct MPT3SAS_ADAPTER *ioc,
	u64 sas_address);
u8 mpt3sas_check_for_pending_internal_cmds(struct MPT3SAS_ADAPTER *ioc,
	u16 smid);

struct _sas_node *mpt3sas_scsih_expander_find_by_handle(
	struct MPT3SAS_ADAPTER *ioc, u16 handle);
struct _sas_node *mpt3sas_scsih_expander_find_by_sas_address(
	struct MPT3SAS_ADAPTER *ioc, u64 sas_address);
struct _sas_device *mpt3sas_get_sdev_by_addr(
	 struct MPT3SAS_ADAPTER *ioc, u64 sas_address);
struct _sas_device *__mpt3sas_get_sdev_by_addr(
	 struct MPT3SAS_ADAPTER *ioc, u64 sas_address);

void mpt3sas_port_enable_complete(struct MPT3SAS_ADAPTER *ioc);
struct _raid_device *
mpt3sas_raid_device_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle);

/* config shared API */
u8 mpt3sas_config_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
	u32 reply);
int mpt3sas_config_get_number_hba_phys(struct MPT3SAS_ADAPTER *ioc,
	u8 *num_phys);
int mpt3sas_config_get_manufacturing_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage0_t *config_page);
int mpt3sas_config_get_manufacturing_pg7(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage7_t *config_page,
	u16 sz);
int mpt3sas_config_get_manufacturing_pg10(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply,
	struct Mpi2ManufacturingPage10_t *config_page);

int mpt3sas_config_get_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply,
	struct Mpi2ManufacturingPage11_t  *config_page);
int mpt3sas_config_set_manufacturing_pg11(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply,
	struct Mpi2ManufacturingPage11_t *config_page);

int mpt3sas_config_get_bios_pg2(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2BiosPage2_t *config_page);
int mpt3sas_config_get_bios_pg3(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2BiosPage3_t *config_page);
int mpt3sas_config_get_iounit_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2IOUnitPage0_t *config_page);
int mpt3sas_config_get_sas_device_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2SasDevicePage0_t *config_page,
	u32 form, u32 handle);
int mpt3sas_config_get_sas_device_pg1(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2SasDevicePage1_t *config_page,
	u32 form, u32 handle);
int mpt3sas_config_get_sas_iounit_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage0_t *config_page,
	u16 sz);
int mpt3sas_config_get_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2IOUnitPage1_t *config_page);
int mpt3sas_config_get_iounit_pg3(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2IOUnitPage3_t *config_page, u16 sz);
int mpt3sas_config_set_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2IOUnitPage1_t *config_page);
int mpt3sas_config_get_iounit_pg8(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2IOUnitPage8_t *config_page);
int mpt3sas_config_get_sas_iounit_pg1(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage1_t *config_page,
	u16 sz);
int mpt3sas_config_set_sas_iounit_pg1(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2SasIOUnitPage1_t *config_page,
	u16 sz);
int mpt3sas_config_get_ioc_pg8(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2IOCPage8_t *config_page);
int mpt3sas_config_get_expander_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2ExpanderPage0_t *config_page,
	u32 form, u32 handle);
int mpt3sas_config_get_expander_pg1(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2ExpanderPage1_t *config_page,
	u32 phy_number, u16 handle);
int mpt3sas_config_get_enclosure_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2SasEnclosurePage0_t *config_page,
	u32 form, u32 handle);
int mpt3sas_config_get_phy_pg0(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2SasPhyPage0_t *config_page, u32 phy_number);
int mpt3sas_config_get_phy_pg1(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigReply_t
	*mpi_reply, Mpi2SasPhyPage1_t *config_page, u32 phy_number);
int mpt3sas_config_get_raid_volume_pg1(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2RaidVolPage1_t *config_page, u32 form,
	u32 handle);
int mpt3sas_config_get_number_pds(struct MPT3SAS_ADAPTER *ioc, u16 handle,
	u8 *num_pds);
int mpt3sas_config_get_raid_volume_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2RaidVolPage0_t *config_page, u32 form,
	u32 handle, u16 sz);
int mpt3sas_config_get_phys_disk_pg0(struct MPT3SAS_ADAPTER *ioc,
	Mpi2ConfigReply_t *mpi_reply, Mpi2RaidPhysDiskPage0_t *config_page,
	u32 form, u32 form_specific);
int mpt3sas_config_get_volume_handle(struct MPT3SAS_ADAPTER *ioc, u16 pd_handle,
	u16 *volume_handle);
int mpt3sas_config_get_volume_wwid(struct MPT3SAS_ADAPTER *ioc,
	u16 volume_handle, u64 *wwid);

/* ctl shared API */
extern struct device_attribute *mpt3sas_host_attrs[];
extern struct device_attribute *mpt3sas_dev_attrs[];
void mpt3sas_ctl_init(ushort hbas_to_enumerate);
void mpt3sas_ctl_exit(ushort hbas_to_enumerate);
u8 mpt3sas_ctl_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
	u32 reply);
void mpt3sas_ctl_reset_handler(struct MPT3SAS_ADAPTER *ioc, int reset_phase);
u8 mpt3sas_ctl_event_callback(struct MPT3SAS_ADAPTER *ioc,
	u8 msix_index, u32 reply);
void mpt3sas_ctl_add_to_event_log(struct MPT3SAS_ADAPTER *ioc,
	Mpi2EventNotificationReply_t *mpi_reply);

void mpt3sas_enable_diag_buffer(struct MPT3SAS_ADAPTER *ioc,
	u8 bits_to_regsiter);
int mpt3sas_send_diag_release(struct MPT3SAS_ADAPTER *ioc, u8 buffer_type,
	u8 *issue_reset);

/* transport shared API */
extern struct scsi_transport_template *mpt3sas_transport_template;
u8 mpt3sas_transport_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
	u32 reply);
struct _sas_port *mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc,
	u16 handle, u64 sas_address);
void mpt3sas_transport_port_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
	u64 sas_address_parent);
int mpt3sas_transport_add_host_phy(struct MPT3SAS_ADAPTER *ioc, struct _sas_phy
	*mpt3sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev);
int mpt3sas_transport_add_expander_phy(struct MPT3SAS_ADAPTER *ioc,
	struct _sas_phy *mpt3sas_phy, Mpi2ExpanderPage1_t expander_pg1,
	struct device *parent_dev);
void mpt3sas_transport_update_links(struct MPT3SAS_ADAPTER *ioc,
	u64 sas_address, u16 handle, u8 phy_number, u8 link_rate);
extern struct sas_function_template mpt3sas_transport_functions;
extern struct scsi_transport_template *mpt3sas_transport_template;
extern int scsi_internal_device_block(struct scsi_device *sdev);
extern int scsi_internal_device_unblock(struct scsi_device *sdev,
				enum scsi_device_state new_state);
/* trigger data externs */
void mpt3sas_send_trigger_data_event(struct MPT3SAS_ADAPTER *ioc,
	struct SL_WH_TRIGGERS_EVENT_DATA_T *event_data);
void mpt3sas_process_trigger_data(struct MPT3SAS_ADAPTER *ioc,
	struct SL_WH_TRIGGERS_EVENT_DATA_T *event_data);
void mpt3sas_trigger_master(struct MPT3SAS_ADAPTER *ioc,
	u32 tigger_bitmask);
void mpt3sas_trigger_event(struct MPT3SAS_ADAPTER *ioc, u16 event,
	u16 log_entry_qualifier);
void mpt3sas_trigger_scsi(struct MPT3SAS_ADAPTER *ioc, u8 sense_key,
	u8 asc, u8 ascq);
void mpt3sas_trigger_mpi(struct MPT3SAS_ADAPTER *ioc, u16 ioc_status,
	u32 loginfo);

/* warpdrive APIs */
u8 mpt3sas_get_num_volumes(struct MPT3SAS_ADAPTER *ioc);
void mpt3sas_init_warpdrive_properties(struct MPT3SAS_ADAPTER *ioc,
	struct _raid_device *raid_device);
u8
mpt3sas_scsi_direct_io_get(struct MPT3SAS_ADAPTER *ioc, u16 smid);
void
mpt3sas_scsi_direct_io_set(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 direct_io);
void
mpt3sas_setup_direct_io(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
	struct _raid_device *raid_device, Mpi2SCSIIORequest_t *mpi_request,
	u16 smid);

#endif /* MPT3SAS_BASE_H_INCLUDED */

redpajama_set_name: RedPajamaGithub


math lesson plan template 2nd grade sample for middle school maths ks3 n educator,math lesson plan sample pdf high school common core weekly template by maths ks3 for middle,guided math lesson plan template kindergarten maths uk doc weekly in sample for middle school,math lesson plan template 4th grade ontario for high school first sample... Instructional Skills: Observation Guide For Lesson Design Observe for and record specific examples of what the teacher did and/or said to demonstrate the elements of lesson design.
Free Book PDF Guided Lesson Plan Template 2nd Grade at Complete PDF Library. This Book have some digital formats such us : paperbook, ebook, kindle, epub, and another formats. Here is The Complete PDF Book Library. It's free to register here to get Book file PDF Guided Lesson Plan Template 2nd Grade. Lesson Plan Template Teaching Resources Teachers Pay December 26th, … 2003 kia optima service manual pdf How to teach math in small groups looks different for each teacher due to personality, teaching style, grade level and a group of kiddos. Here is how I create a guided math binder to help me stay on top of lesson planning for my four kindergarten math groups.
"grade guided reading lesson plan template guided reading lesson plan template grade bee less on unusual printable" "I have actually personally used this website. A website with several Guided Reading Lesson Plan sets for trade books appropriate to several grade levels.


Peel and cube all the potatoes and boil in a medium pot of salted water until tender. Drain and place in a medium bowl. Set aside the pot for later use.
Whip together the potatoes, butter, cream cheese (or sour cream), seasoning, and as little milk as needed to form a thick but spreadable consistency.
Heat the olive oil in a large pot and quickly sear the chicken pieces, seasoning with salt and pepper. Lightly brown just the outsides and remove to a bowl. Deglaze the pan with wine, stirring up the brown bits with a wooden spoon. Add the carrots, celery, mushrooms, and parsley, and simmer uncovered on low.
While the vegetables are simmering, make the cream sauce. Melt two tablespoons of butter in the old potato pot and sweat the onions and shallots over very low heat. Whisk in the flour and continue stirring over low heat for at least five minutes. Add the garlic and stir another two minutes. When the flour is lightly golden, whisk in 1/2 c. of cream/milk and all of the broth. Continue whisking while the mixture thickens. Add the bay, rosemary, chives, salt, and pepper and cook 2 minutes.
Stir the cream sauce into the veggie-wine mixture and add the chopped spinach. Cook three minutes more until the spinach releases its water. Add back the chicken and its juices. Season and add nutmeg and cayenne to taste. The mixture should be a thick stew-like consistency. Thin (only if needed) with a little more milk. Remove the bay leaves, if using.
Pour the filling into a large buttered casserole dish. Let cool 5 min., then spread the mashed potatoes as evenly as possible over top without disturbing the filling. It's OK if the topping doesn't quite reach the edges. Spritz or drizzle the top with a little olive oil and sprinkle with paprika.
Bake the casserole for 25 min @ 425F on a foil-lined baking sheet. If desired, broil the top for 3-4 minutes to lightly brown. Allow to cool at least 10 minutes before cutting and serving.


text:
Christopher Tolkien Hates the Peter Jackson Movies
Christopher Tolkien, the son of J.R.R. Tolkien, gave his first interview to the media last year after being his father's literary executor for four decades. Speaking to the French newspaper Le Monde, the 87-year-old expressed great unhappiness with the Peter Jackson movies even though they helped sell 25 million copies of the books in three years, a 1,000 percent increase: Invited to meet Peter Jackson, the Tolkien family preferred not to. Why? "They eviscerated the book by making it an ... (read more)
The World Already Has Enough Artists?
I maintain a list on Twitter of all Hugo Award-nominated best novel writers who use the service. A lot of cool stuff comes over the relatively low-traffic list, particularly related to science and creativity. At a Connecticut Forum event for high school students, the comics and science fiction writer Neil Gaiman was questioned by a teen who had been discouraged from being a director because there are "enough artists in the world." Gaiman's answer is perfect. ... (read more)
Attending the Florida Heritage Book Festival
At the Florida Heritage Book Festival in St. Augustine this past weekend I saw speeches by novelists Jeff Lindsay (Darkly Dreaming Dexter), Steve Berry (The Templar Legacy) and Diana Abu-Jaber (Arabian Jazz). I have an unpublished thriller in its second draft that's around 60,000 words long, so I go to these festivals looking for tips on how to become a more gooder writer and also to establish a daily writing routine to finish it. I've proven conclusively in the past year the novel won't finish ... (read more)
Two Science Fiction Novels I Didn't Finish
I hit a bad streak reading novels this month. My house is overflowing with books I've been meaning to read, so I will give up on a novel when I've abandoned all hope of being entertained. I figure if I'm not enjoying a book after 50 to 75 pages, it's time to bail. I reached that point with Wilson Tucker's The Year of the Quiet Sun (1970) and Philip K. Dick's The Divine Invasion (1981). Quiet Sun is a Nebula Award-nominated time-travel novel by the late Wilson "Bob" Tucker. He was an active ... (read more)
Predicting the Next Hugo Award-Winning Novel
For the last two years I've voted in the Hugo Awards, yearly literary honors for science fiction and fantasy (but mostly science fiction). I skipped the best novel category because I hadn't read most of the works, which is no fun at all since that's the biggest award. So when the 2010 Hugos are decided next spring, I'd like to have completed enough of the nominated novels to make an informed vote. This won't be easy, since I only read around one book a month. But after digging into the history ... (read more)
Locus Awards Change Rules, Foil Cory Doctorow
Cory Doctorow's short story collection Overclocked was nominated this year for a Locus Award, a science fiction honor voted on by the public and tabulated by Locus magazine. Votes were accepted online, and several links during the balloting on Doctorow's ginormously popular Boing Boing blog helped his book receive the most votes in that category. But if you check out the award winners, you won't find Doctorow's book on the list. Locus changed the rules after voting was over, deciding to give ... (read more)
Voting Ends for This Year's Hugo Awards
Today's the last day to vote on the 2008 Hugo Awards, which will be given out at the World Science Fiction Convention next month in Denver. I joined the convention as a supporting member last fall to vote for the first time on the awards, which began in 1955 and have become the most coveted prize in science fiction. In April, the Hugo nominees were announced. All of the nominees in several categories can be read for free online, including short stories, novellas, novelettes and fanzines. Four ... (read more)
Robert Heinlein's Encyclopedia of the Future
One of the things I enjoy about reading old science fiction is grading the speculative guesses about the future. In his 1954 novel The Star Beast, Robert Heinlein imagines the encyclopedia of the future, a giant mechanical supercomputer that occupies an entire building: The universal dictionary in the British Museum was not more knowledgeable than the one in the Under Secretary's office; its working parts occupied an entire building in another part of Capital, and a staff of cyberneticists, ... (read more)
A visitor to the Drudge Retort remembers Andre Norton, the science fiction author who died Thursday at age 93: I was an indifferent and sullen youth, prone to acting out at school occasionally, and as a result, was sent to the library as a kind of holding cell/punishment. One day, bored out of my mind, I reached back and grabbed the first book that my hand fell upon and started reading. It was Ms. Norton's Witch World. My love of reading started with that book, which led me to Bradbury, ... (read more)
Church of the Risen Elvis
Because Atlanta courtroom killer Brian Nichols was read parts of The Purpose-Driven Life by his last hostage, CNN is republishing an interview the book's author did last November on Larry King Live. The book sounds like 336 pages of merciless flogging, based on the simplistic platitudes that the author, Rev. Rick Warren, inflicts on King ("The middle letter of pride is I, and the middle letter of sin is I"). The middle letter of tripe is I, too, reverend. But I'm linking to call attention to ... (read more)
Rogers Cadenhead
Andrew Connell
BillSaysThis
Burning Bird
Curt Jester
Drudge Retort
Freeform Goodness
Jack William Bell
Jake Savin
Jason Shellen
Jonathan Bourne
Lies.com
Lotta Nothing
Mediajunkie
News from Me
Rasterweb
SportsFilter
RSS Board
Sportscard Stores
TV Deadpool
URouLette
Videogame Stores
Wargames.Com
Winnetoba Radio
What You Say / Cold War Kids
Freaks / Surf Curse
Beggin' / Maneskin
Can You Handle My Love? / Walk the Moon
NDA / Billie Eilish
Angela / The Lumineers
Whole Wide World / Cage the Elephant
Everything Now / Arcade Fire
Lay It On Me / Vance Joy
Wrecked / Imagine Dragons
This blog has been published since Nov. 7, 1999 (a span of 8,112 days).
Thank you for visiting Workbench.


Vintagecans offers very flexible consignment terms for those seeking the exposure the Web provides without the expense and maintenance of their own website, or the hassle and confusion of auction sites and online payment sevices with their ever-increasing fees and regulations.
Depending on the value and number of items consigned, fees range from 10% - 20%. The fee includes cleaning, photography, web posting and shipping of all consigned items. I can assist with pricing or consignees are free to set their own prices.
In addition to a constant online presence, consigned items are promoted through periodic site update notifications (email) and are brought to local and major shows including Blue & Gray and—in 2012—CANvention.
• As mentioned above, no confusing fee structure.
To learn more about consignments please give me a call at 508-212-2061 and I'll be happy to answer any questions.
*A nominal fee applies to cover photography and posting of consigned items that sell via means other than consignment.


Recently, I was a part of a really good and stimulating Twitter conversation that involved many people and lasted many days (see a collection of the tweets here). The conversation started with us discussing instructional design and learning experience design, the former being seen as a rather outmoded skill that has been trumped by the rather grandiose sounding learning experience design.
The conversation took in other topics too, such as the need for evidence to support different types of design and the need for theories to make sense of data and evidence. It featured some big names in corporate learning, people who are regular speakers at L&D conferences. And it was a great conversation, with a really good depth and breadth of thinking shared – I learned a lot from it.
I like to think I am pretty good at staying on top of the latest thinking and trends in L&D – I curate this stuff for clients after all. But this conversation encapsulated much more thinking and challenge than you normally get in articles, video and at events. I said as much during this Twitter conversation and asked some of those in the conversation why the thinking being shared is normally so difficult to find. What was the response? That this thinking is available for all to see, but it is mostly to be found on personal websites and blog posts.
And this is precisely my point. This thinking and these types of discussion tend to exist on the edge of corporate learning discourse. They are on the edge rather than mainstream. That's not good enough. My view is that most L&D and HR professionals are unaware of the blogs where this thinking resides and are unfamiliar with the people who are discussing the ideas on social networks such as Twitter.
And yet these are the places where the new ideas in corporate learning are being aired and discussed. These ideas challenge conventional thinking as well as looking at what is worth keeping.
The conversation raised some good points around data, evidence and theories. For example, 'What use is research without a theory?' asked Nick Shackleton-Jones. And it surfaced some thinkers that L&D may be less familiar with. As change pushes organisations and L&D into new and unchartered waters, the industry will need good thinking and robust theories to help guide its actions. At the same time, the old theories that L&D has traditionally relied on will continue to be stress tested by new research. Already research has shown concepts such as learning styles don't work. Could more thinking that L&D has relied upon go the same way?
The irony here is that we are talking about learning, about being curious and continually developing our thinking in order to do good work and do it well. Is there enough good thinking in corporate learning? Yes, but much of it is happening at the edge of the discourse, which means that it doesn't have a broad enough reach.


This is what liberals call common sense: Enforcing stringent gun control laws that make it harder and harder for innocent Americans to defend themselves, all the while releasing life-sentence inmates from prison into the public. Sounds like a recipe for disaster and mayhem if you ask me.
But that's exactly what's been happening in California. Governor Brown has had to deal with an overcrowded prison problem in his state. So, naturally, his solution was not to let the nonviolent, arbitrary code-violators go, but to let the ones go who had planned to stay locked up for the rest of their lives. You know, like murderers and rapists.
Nearly 1,400 lifers in California's prisons have been released over the past three years in a sharp turnaround in a state where murderers and others sentenced to life with the possibility of parole almost never got out.
So they're letting violent criminals go free, while prohibiting the law-abiding residents more and more from owning firearms for self-defense against these newly released criminals. This is what liberals call common sense.


"Pricing is competitive and consistent. Support is exceptional…"
"I have been a Megapath [sic] partner for almost 10 years. We have used them for VOIP and internet service for our customers throughout the U.S. We've been very fortunate to have a great account manager and access to the correct people that have made things happen in locations where connectivity was difficult.
We only recommend Megapath [sic] to our customers for internet access especially for enterprise customers.
Pricing is competitive and consistent. Support is exceptional, especially at level 2."
"They have always met their SLAs..."
"I have dealt with Covad for many years and the move to MegaPath was nothing more than a name change to me and my company. I have no issues with support – connection – equipment issues. They have always met their SLAs that they have...I have to say since I started using Covad/MegaPath – I have not missed a startup date at one of my branches."
"I had a great experience with Megapath install. I'm getting consistently good speeds..."
"I had a great experience with Megapath [sic] install. Their installer was professional and well versed in networking. Everything was working flawlessly before he left and continues to work flawlessly. I'm getting consistently good speeds and have no trouble streaming and gaming. I would use Megapath over Comcast any day.
"...light years ahead of our previous provider..."
"MegaPath was a welcome change in quality of service..."
"MegaPath was a welcome change in quality of service from our previous providers. We had become accustomed to dropped calls and poor customer support. When we finally had had enough, we found MegaPath and it's one of the best business decisions we have made. We don't have anymore [sic] dropped calls or outages that cost us potential clients. MegaPath also providers [sic] our Internet service now too which is helpful to have both services coming from the same provider."
"…great job keeping me informed"
"We are a new customer with Megapath [sic] for internet backup services. Megapath has done a great job keeping me informed on installation and construction at multiple locations."


text:
Biografia
Attivo in gare FIS dal dicembre del 2001, Kantola esordì in Coppa Europa il 1º dicembre 2004 a Levi in slalom gigante, senza completare la gara. Ai Mondiali juniores di Québec 2006 vinse la medaglia d'argento nello slalom gigante; nello stesso anno esordì in Coppa del Mondo, il 12 novembre a Levi in slalom speciale senza completare la gara, e ottenne il miglior piazzamento in Coppa Europa, il 28 novembre nella medesima località in slalom gigante (6º).

Ai Mondiali di Åre 2007, sua unica presenza iridata, si classificò 38º nello slalom gigante; prese per l'ultima volta il via in Coppa del Mondo il 16 novembre 2008 a Levi in slalom speciale, senza completare la gara (non portò a termine nessuna delle cinque gare nel massimo circuito cui prese parte), e in Coppa Europa il 26 novembre 2009 sempre a Levi in slalom gigante, senza completare quella che sarebbe rimasta l'ultima gara della sua carriera.

Palmarès

Mondiali juniores
 1 medaglia:
 1 argento (slalom gigante a Québec 2006)

Coppa Europa
 Miglior piazzamento in classifica generale: 61º nel 2007

Campionati finlandesi
 7 medaglie:
 1 oro (slalom speciale nel 2008)
 5 argenti (slalom gigante nel 2006; supergigante, slalom speciale nel 2007; slalom speciale, supercombinata nel 2009)
 1 bronzo (slalom gigante nel 2007)

Collegamenti esterni

redpajama_set_name: RedPajamaWikipedia


Clad yourself in some perfectly chic and feminine dresses that can easily transition from day to night. Essentially a modern working woman's fashion dream. Each look can effortlessly transition from day work look to night with few clever tricks. From beautifully crafted designs and patterns in vivid shades to neutral tones, there is a piece you can love regardless of your sartorial disposition.